Class: Fog::Parsers::AWS::RDS::TagListParser
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Fog::Parsers::AWS::RDS::TagListParser
- Defined in:
- lib/fog/aws/parsers/rds/tag_list_parser.rb
Overview
parses an XML-formatted list of resource tags from AWS
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #end_element(name) ⇒ Object
-
#reset ⇒ Object
each tag is modeled as a String pair (2-element Array).
Methods inherited from Base
#attr_value, #characters, #end_element_namespace, #initialize, #start_element, #start_element_namespace, #value
Constructor Details
This class inherits a constructor from Fog::Parsers::Base
Instance Method Details
#end_element(name) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fog/aws/parsers/rds/tag_list_parser.rb', line 16 def end_element(name) super case name when 'Tag' @tags[@this_key] = @this_value @this_key, @this_value = nil, nil when 'Key' @this_key = value when 'Value' @this_value = value when 'TagList' @response['ListTagsForResourceResult']['TagList'] = @tags end end |
#reset ⇒ Object
each tag is modeled as a String pair (2-element Array)
9 10 11 12 13 14 |
# File 'lib/fog/aws/parsers/rds/tag_list_parser.rb', line 9 def reset @this_key = nil @this_value = nil @tags = Hash.new @response = {'ListTagsForResourceResult' => {'TagList' => {}}} end |