Class: EAAL::Result::ResultContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/eaal/eaal_result.rb

Overview

Result Container class, …

Direct Known Subclasses

EAAL::Rowset::RowBase

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResultContainer

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

#containerObject

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