class Fog::Parsers::AWS::Compute::DescribeSpotPriceHistory

Public Instance Methods

end_element(name) click to toggle source
# File lib/fog/aws/parsers/compute/describe_spot_price_history.rb, line 11
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
reset() click to toggle source
# File lib/fog/aws/parsers/compute/describe_spot_price_history.rb, line 6
def reset
  @spot_price = {}
  @response = { 'spotPriceHistorySet' => [] }
end