Sha256: 805d79819bc488b5dcb304844bad417986309550d00260d8cb32e5792f37c5e4

Contents?: true

Size: 834 Bytes

Versions: 36

Compression:

Stored size: 834 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module Compute
        class DescribeSpotPriceHistory < Fog::Parsers::Base
          def reset
            @spot_price = {}
            @response = { 'spotPriceHistorySet' => [] }
          end

          def end_element(name)
            case name
            when 'availabilityZone', 'instanceType', 'productDescription'
              @spot_price[name] = value
            when 'item'
              @response['spotPriceHistorySet'] << @spot_price
              @spot_price = {}
            when 'requestId', 'nextToken'
              @response[name] = value
            when 'spotPrice'
              @spot_price[name] = value.to_f
            when 'timestamp'
              @spot_price[name] = Time.parse(value)
            end
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fog-aws-3.29.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.28.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.27.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.26.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.25.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.24.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.23.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.22.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.21.1 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.21.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.20.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.19.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.18.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.17.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.16.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.15.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.14.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.13.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.12.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-3.11.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb