Class: EAAL::Result::ResultContainer
- Inherits:
-
Object
- Object
- EAAL::Result::ResultContainer
- Defined in:
- lib/eaal/eaal_result.rb
Overview
Result Container class, …
Direct Known Subclasses
Instance Attribute Summary collapse
-
#container ⇒ Object
Returns the value of attribute container.
Instance Method Summary collapse
- #add_element(key, val) ⇒ Object
-
#initialize ⇒ ResultContainer
constructor
A new instance of ResultContainer.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize ⇒ ResultContainer
Returns a new instance of ResultContainer.
19 20 21 |
# File 'lib/eaal/eaal_result.rb', line 19 def initialize self.container = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
27 28 29 |
# File 'lib/eaal/eaal_result.rb', line 27 def method_missing(method, *args) self.container[method.id2name] end |
Instance Attribute Details
#container ⇒ Object
Returns the value of attribute container.
17 18 19 |
# File 'lib/eaal/eaal_result.rb', line 17 def container @container end |
Instance Method Details
#add_element(key, val) ⇒ Object
23 24 25 |
# File 'lib/eaal/eaal_result.rb', line 23 def add_element(key, val) self.container.merge!({key => val}) end |