Class: MindReader::ConfigurableObject
- Inherits:
-
Object
- Object
- MindReader::ConfigurableObject
- Defined in:
- lib/mind_reader.rb
Instance Attribute Summary collapse
-
#configs ⇒ Object
readonly
Returns the value of attribute configs.
Instance Method Summary collapse
-
#initialize ⇒ ConfigurableObject
constructor
A new instance of ConfigurableObject.
- #method_missing(method_name, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ ConfigurableObject
Returns a new instance of ConfigurableObject.
98 99 100 |
# File 'lib/mind_reader.rb', line 98 def initialize @configs = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
102 103 104 |
# File 'lib/mind_reader.rb', line 102 def method_missing(method_name, *args, &block) @configs << {:field => method_name, :args => args.first, :block => block} end |
Instance Attribute Details
#configs ⇒ Object (readonly)
Returns the value of attribute configs.
106 107 108 |
# File 'lib/mind_reader.rb', line 106 def configs @configs end |