Class: Google::Books::Price

Inherits:
Object
  • Object
show all
Defined in:
lib/bookle/google_books_price.rb

Direct Known Subclasses

ListPrice, RetailPrice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(price) ⇒ Price

Returns a new instance of Price.



6
7
8
9
10
# File 'lib/bookle/google_books_price.rb', line 6

def initialize(price)
     price           = {} unless price
	@amount					= price["amount"]
	@currency_code	= price["currencyCode"]
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/bookle/google_books_price.rb', line 4

def amount
  @amount
end

#currency_codeObject (readonly)

Returns the value of attribute currency_code.



4
5
6
# File 'lib/bookle/google_books_price.rb', line 4

def currency_code
  @currency_code
end