Class: Fog::Parsers::Schema::NodeArray
- Inherits:
-
Node
- Object
- Node
- Fog::Parsers::Schema::NodeArray
show all
- Defined in:
- lib/ext_fog_aws/fog/parsers/schema.rb
Instance Attribute Summary
Attributes inherited from Node
#name
Instance Method Summary
collapse
Methods inherited from Node
#next_result, #update_result
Constructor Details
Returns a new instance of NodeArray.
163
164
165
166
167
|
# File 'lib/ext_fog_aws/fog/parsers/schema.rb', line 163
def initialize(*)
super
@count = 0
@result_pointer[name] = []
end
|
Instance Method Details
#new_item ⇒ Object
173
174
175
176
177
178
|
# File 'lib/ext_fog_aws/fog/parsers/schema.rb', line 173
def new_item
index = @count
@count += 1
item_class = next_schema.is_a?(Hash) ? NodeHash : NodeValue
item_class.new(name, @schema_pointer, @result_pointer, index)
end
|
#next_schema ⇒ Object
169
170
171
|
# File 'lib/ext_fog_aws/fog/parsers/schema.rb', line 169
def next_schema
@schema_pointer[name].first
end
|