Class: OpenCollection
Overview
OpenCollection
Instance Method Summary collapse
-
#initialize(*hash) ⇒ OpenCollection
constructor
A new instance of OpenCollection.
- #method_missing(sym) ⇒ Object
Constructor Details
#initialize(*hash) ⇒ OpenCollection
Returns a new instance of OpenCollection.
33 34 35 36 37 |
# File 'lib/more/facets/opencollection.rb', line 33 def initialize(*hash) @opens = hash.map do |h| OpenObject.new(h) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym) ⇒ Object
39 40 41 42 43 |
# File 'lib/more/facets/opencollection.rb', line 39 def method_missing(sym) @opens.map do |o| o.send(sym) end end |