Class: Google::Books::Price
- Inherits:
-
Object
- Object
- Google::Books::Price
- Defined in:
- lib/bookle/google_books_price.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#currency_code ⇒ Object
readonly
Returns the value of attribute currency_code.
Instance Method Summary collapse
-
#initialize(price) ⇒ Price
constructor
A new instance of Price.
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
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/bookle/google_books_price.rb', line 4 def amount @amount end |
#currency_code ⇒ Object (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 |