Sha256: b1c4b9fa8afcfa45c4263a6dd3e10bd021be64d310673d5d971d7cac78f6e49c

Contents?: true

Size: 821 Bytes

Versions: 22

Compression:

Stored size: 821 Bytes

Contents

module Fog
  module Parsers
    module Compute
      module AWS
        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'
              @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

22 entries across 22 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-0.1.1 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-0.1.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-0.0.8 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-0.0.7 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-0.0.6 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-aws-0.0.5 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-1.26.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-1.25.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
nsidc-fog-1.24.1 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-1.24.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.11 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.10 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.9 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.8 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.7 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.6 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
fog-1.23.0 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.4 lib/fog/aws/parsers/compute/describe_spot_price_history.rb
ns-fog-1.22.3 lib/fog/aws/parsers/compute/describe_spot_price_history.rb