Class: Zona::JSONPool
- Inherits:
-
JSONElement
- Object
- JSONElement
- Zona::JSONPool
- Defined in:
- zona/OZonesJSON.rb
Overview
This class represents a collection of JSON Elements and it is itself one
Direct Known Subclasses
Instance Method Summary (collapse)
-
- (Object) each_element(block)
Allows to iterate through the elements of a JSONPool.
-
- (JSONPool) initialize(json_hash = nil)
constructor
Initializes an instance.
Methods inherited from JSONElement
Constructor Details
- (JSONPool) initialize(json_hash = nil)
Initializes an instance
104 105 106 |
# File 'zona/OZonesJSON.rb', line 104 def initialize(json_hash=nil) super(json_hash) end |
Instance Method Details
- (Object) each_element(block)
Allows to iterate through the elements of a JSONPool
110 111 112 113 114 |
# File 'zona/OZonesJSON.rb', line 110 def each_element(block) @json_hash[@element_name].each do |elem| block.call self.factory(elem) end end |