Sha256: eba05205cdb27a61ecce9bee297d84abc1b68f5d599e54028531a4cf9101a5bd

Contents?: true

Size: 921 Bytes

Versions: 72

Compression:

Stored size: 921 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module RDS
        # parses an XML-formatted list of resource tags from AWS
        class TagListParser < Fog::Parsers::Base

          # each tag is modeled as a String pair (2-element Array)
          def reset
            @this_key   = nil
            @this_value = nil
            @tags       = Hash.new
            @response   = {'ListTagsForResourceResult' => {'TagList' => {}}}
          end

          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

        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 9 rubygems

Version Path
fog-maestrodev-1.15.0.20130927082724 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-maestrodev-1.15.0.20130829165835 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.15.0 lib/fog/aws/parsers/rds/tag_list_parser.rb
gapinc-fog-1.14.0 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.14.0 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.13.0 lib/fog/aws/parsers/rds/tag_list_parser.rb
gapinc-fog-1.12.1.2 lib/fog/aws/parsers/rds/tag_list_parser.rb
gapinc-fog-1.12.1.1 lib/fog/aws/parsers/rds/tag_list_parser.rb
gapinc-fog-1.12.1a lib/fog/aws/parsers/rds/tag_list_parser.rb
gapinc-fog-1.12.1 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.12.1 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.12.0 lib/fog/aws/parsers/rds/tag_list_parser.rb
hpfog-0.0.20 lib/fog/aws/parsers/rds/tag_list_parser.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/aws/parsers/rds/tag_list_parser.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-nirvanix-1.8.2 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.11.1 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-1.11.0 lib/fog/aws/parsers/rds/tag_list_parser.rb
fog-nirvanix-1.8.1 lib/fog/aws/parsers/rds/tag_list_parser.rb