class Vacuum::Parser::ItemSearchResponse::Items::Entry::Price

Attributes

Amount[RW]
CurrencyCode[RW]
FormattedPrice[RW]
Price[RW]

Public Class Methods

new(price) click to toggle source
# File lib/vacuum/parser/itemsearch_response.rb, line 161
def initialize(price)
  raise ParserError.new('Not a Node') unless price.is_a?(Nokogiri::XML::Node)
  @Price = price
  @Amount = (n = @Price.at('./xmlns:Amount')) && n.content.to_i
  @CurrencyCode = (n = @Price.at('./xmlns:CurrencyCode')) && n.content.to_sym
  @FormattedPrice = (n = @Price.at('./xmlns:FormattedPrice')) && n.content
end