Sha256: 6d87662fb6d099d56b8606f4370871f2859afb63303a1f18bcd8ea22295ebf9e

Contents?: true

Size: 772 Bytes

Versions: 2

Compression:

Stored size: 772 Bytes

Contents

require 'fog/aws/parsers/simpledb/basic'

module Fog
  module Parsers
    module AWS
      module SimpleDB

        class DomainMetadata < Fog::Parsers::AWS::SimpleDB::Basic

          def reset
            @response = {}
          end

          def end_element(name)
            case name
            when 'AttributeNameCount', 'AttributeNamesSizeBytes', 'AttributeValueCount', 'AttributeValuesSizeBytes', 'ItemCount', 'ItemNamesSizeBytes'
              response[name] = value.to_i
            when 'BoxUsage'
              response[name] = value.to_f
            when 'RequestId'
              response[name] = value
            when 'Timestamp'
              response[name] = Time.at(value.to_i)
            end
          end

        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-1.22.0 lib/fog/aws/parsers/simpledb/domain_metadata.rb
fog-1.21.0 lib/fog/aws/parsers/simpledb/domain_metadata.rb