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

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Attributes inherited from Frame

#parent, #ref, #result

Instance Method Summary collapse

Methods inherited from Frame

#consume_child_frame, new, #path, #set_text, #yield_unhandled_value

Constructor Details

#initialize(xml_name, *args) ⇒ MapEntryFrame

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MapEntryFrame.



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

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)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



229
230
231
# File 'lib/aws-sdk-core/xml/parser/frame.rb', line 229

def key
  @key
end

#valueFrame (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



232
233
234
# File 'lib/aws-sdk-core/xml/parser/frame.rb', line 232

def value
  @value
end

Instance Method Details

#child_frame(xml_name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



234
235
236
237
238
239
240
241
242
# File 'lib/aws-sdk-core/xml/parser/frame.rb', line 234

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