Method: Parameter#method_missing
- Defined in:
- lib/cfn-model/model/parameter.rb
#method_missing(method_name, *args) ⇒ Object
Treat any missing method as an instance variable get/set
This will allow arbitrary elements in Resource/Properties definitions to map to instance variables without having to anticipate them in a schema
26 27 28 29 30 31 32 |
# File 'lib/cfn-model/model/parameter.rb', line 26 def method_missing(method_name, *args) if method_name =~ /^(\w+)=$/ instance_variable_set "@#{$1}", args[0] else instance_variable_get "@#{method_name}" end end |