Sha256: a384169ebc3ce7d554d73b022ebd4b0e6ccc74e15d83b005fbb9ef9293f50cfb

Contents?: true

Size: 1.32 KB

Versions: 23

Compression:

Stored size: 1.32 KB

Contents

module Fog
  module Parsers
    module DNS
      module AWS

        class ListResourceRecordSets < Fog::Parsers::Base

          def reset
            @resource_record = []
            @resource_record_set = {}
            @resource_record_set['ResourceRecords'] = []
            @response = {}
            @response['ResourceRecordSets'] = []
            @section = :resource_record_set
          end
          
          def end_element(name)
            if @section == :resource_record_set
              case name
              when 'Name', 'Type', 'TTL'
                @resource_record_set[name] = value
              when 'Value'
                @resource_record_set['ResourceRecords'] << value
              when 'ResourceRecordSet'
                @response['ResourceRecordSets'] << @resource_record_set
                @resource_record_set = {}
                @resource_record_set['ResourceRecords'] = []
              when 'ResourceRecordSets'
                @section = :main
              end
            elsif @section == :main
                case name
                when 'MaxItems'
                  @response[name]= value.to_i
                when 'IsTruncated', 'NextRecordName', 'NextRecordType'
                  @response[name]= value
                end
            end
          end

        end

      end
    end
  end
end

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
fog-1.1.2 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
fog_tractical-1.1.4 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
fog_tractical-1.1.3 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
fog-1.1.1 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
fog-1.1.0 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/dns/list_resource_record_sets.rb
tag-fog-1.0.1 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/aws/list_resource_record_sets.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/aws/list_resource_record_sets.rb
fog-1.0.0 lib/fog/aws/parsers/dns/list_resource_record_sets.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/dns/parsers/aws/list_resource_record_sets.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/dns/parsers/aws/list_resource_record_sets.rb
fog-0.11.0 lib/fog/dns/parsers/aws/list_resource_record_sets.rb
fog-0.10.0 lib/fog/dns/parsers/aws/list_resource_record_sets.rb