Class: Aws::Xml::Parser Private
- Inherits:
-
Object
- Object
- Aws::Xml::Parser
- Defined in:
- lib/aws-sdk-core/xml/parser.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 Method Summary collapse
-
#initialize(shape) ⇒ Parser
constructor
private
A new instance of Parser.
- #parse(xml, target = nil) {|xml| ... } ⇒ Structure private
Constructor Details
#initialize(shape) ⇒ Parser
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 Parser.
10 11 12 |
# File 'lib/aws-sdk-core/xml/parser.rb', line 10 def initialize(shape) @shape = shape end |
Instance Method Details
#parse(xml, target = nil) {|xml| ... } ⇒ Structure
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.
17 18 19 20 21 |
# File 'lib/aws-sdk-core/xml/parser.rb', line 17 def parse(xml, target = nil, &block) xml = MultiXml.parse(xml).values.first || {} yield(xml) if block_given? structure(@shape, xml, target) end |