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

Class: Aws::Xml::Parser::MapEntryFrame

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

Instance Attribute Summary collapse

Attributes inherited from Frame

#parent, #ref, #result

Instance Method Summary collapse

Methods inherited from Frame

#consume_child_frame, new, #set_text

Constructor Details

#initialize(xml_name, *args) ⇒ MapEntryFrame

Returns a new instance of MapEntryFrame



206
207
208
209
210
211
212
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 206

def initialize(xml_name, *args)
  super
  @key_name = @ref.shape.key.location_name || 'key'
  @key = Frame.new(xml_name, self, @ref.shape.key)
  @value_name = @ref.shape.value.location_name || 'value'
  @value = Frame.new(xml_name, self, @ref.shape.value)
end

Instance Attribute Details

#keyStringFrame (readonly)

Returns:



215
216
217
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 215

def key
  @key
end

#valueFrame (readonly)

Returns:



218
219
220
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 218

def value
  @value
end

Instance Method Details

#child_frame(xml_name) ⇒ Object



220
221
222
223
224
225
226
227
228
# File 'gems/aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb', line 220

def child_frame(xml_name)
  if @key_name == xml_name
    @key
  elsif @value_name == xml_name
    @value
  else
    NullFrame.new(xml_name, self)
  end
end