You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Xml::Parser::MapFrame

Inherits:
Frame
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb

Instance Attribute Summary

Attributes inherited from Frame

#parent, #ref, #result

Instance Method Summary collapse

Methods inherited from Frame

new, #set_text

Constructor Details

#initialize(*args) ⇒ MapFrame

Returns a new instance of MapFrame



185
186
187
188
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 185

def initialize(*args)
  super
  @result = {}
end

Instance Method Details

#child_frame(xml_name) ⇒ Object



190
191
192
193
194
195
196
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 190

def child_frame(xml_name)
  if xml_name == 'entry'
    MapEntryFrame.new(xml_name, self, @ref)
  else
    raise NotImplementedError
  end
end

#consume_child_frame(child) ⇒ Object



198
199
200
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 198

def consume_child_frame(child)
  @result[child.key.result] = child.value.result
end