Sha256: 4aae8a890717b24cd085ea6c7792a0eef50410196dd133398880f73d135ac489

Contents?: true

Size: 861 Bytes

Versions: 6

Compression:

Stored size: 861 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'
              @zone[name] = value.sub('/hostedzone/', '')
            when '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

6 entries across 6 versions & 1 rubygems

Version Path
fog-aws-3.5.2 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-aws-3.5.1 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-aws-3.5.0 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-aws-3.4.0 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-aws-3.3.0 lib/fog/aws/parsers/dns/list_hosted_zones.rb
fog-aws-3.2.0 lib/fog/aws/parsers/dns/list_hosted_zones.rb