aboutsummaryrefslogtreecommitdiff
path: root/lib/object_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/object_builder.rb')
-rw-r--r--lib/object_builder.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/object_builder.rb b/lib/object_builder.rb
index ebd655b..ccb2c63 100644
--- a/lib/object_builder.rb
+++ b/lib/object_builder.rb
@@ -181,6 +181,20 @@ class ObjectBuilder
end
end
+ # This catches all methods available for a provider, as needed.
+ #
+ # Missing methods / bad arguments etc. are caught in the
+ # ObjectBuilder#parse method, via NoMethodError.
+ #
+ def method_missing(name, value=nil)
+ if value
+ result.send("#{name}=".to_sym, value)
+ else
+ result.send(name.to_sym)
+ end
+ end
+
+
class << self
# Defines a new builder