Sha256: b1abc8ac52c49bd345eb0e12f3207b5e08e8f46231af9723fbadd021679dd400

Contents?: true

Size: 794 Bytes

Versions: 3

Compression:

Stored size: 794 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module DNS

        class ListHostedZones < Fog::Parsers::Base

          def reset
            @hosted_zones = []
            @zone = {}
            @response = {}
          end

          def end_element(name)
            case name
            when 'Id', 'Name', 'CallerReference', 'Comment'
              @zone[name] = @value
            when 'HostedZone'
              @hosted_zones << @zone
              @zone = {}
            when 'HostedZones'
              @response['HostedZones'] = @hosted_zones
            when 'MaxItems'
              @response[name] = @value.to_i
            when 'IsTruncated', 'Marker', 'NextMarker'
              @response[name] = @value
            end
          end

        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-0.3.34 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-0.3.33 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-0.3.32 lib/fog/aws/parsers/dns/list_hosted_zones.rb