Sha256: 28d161022fd610b491205927181371b91ba3cffb9f314c3fc51dee65618b634b

Contents?: true

Size: 869 Bytes

Versions: 14

Compression:

Stored size: 869 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

14 entries across 14 versions & 2 rubygems

Version Path
fog-0.7.2 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.7.1 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.7.0 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.6.0 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.5.3 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.5.2 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.5.1 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.5.0 lib/fog/dns/parsers/aws/list_hosted_zones.rb
phpfog-fog-0.4.1.3 lib/fog/dns/parsers/aws/list_hosted_zones.rb
phpfog-fog-0.4.1.2 lib/fog/dns/parsers/aws/list_hosted_zones.rb
phpfog-fog-0.4.1.1 lib/fog/dns/parsers/aws/list_hosted_zones.rb
phpfog-fog-0.4.1 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.4.1 lib/fog/dns/parsers/aws/list_hosted_zones.rb
fog-0.4.0 lib/fog/aws/parsers/dns/list_hosted_zones.rb