Class: BookInStock
- Inherits:
-
Object
- Object
- BookInStock
- Defined in:
- lib/large_csv_reader/book_in_stock.rb
Instance Attribute Summary collapse
-
#isbn ⇒ Object
readonly
Returns the value of attribute isbn.
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(isbn, price) ⇒ BookInStock
constructor
A new instance of BookInStock.
Constructor Details
#initialize(isbn, price) ⇒ BookInStock
Returns a new instance of BookInStock.
4 5 6 7 |
# File 'lib/large_csv_reader/book_in_stock.rb', line 4 def initialize(isbn, price) @isbn = isbn @price = Float(price) end |
Instance Attribute Details
#isbn ⇒ Object (readonly)
Returns the value of attribute isbn.
2 3 4 |
# File 'lib/large_csv_reader/book_in_stock.rb', line 2 def isbn @isbn end |
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/large_csv_reader/book_in_stock.rb', line 3 def price @price end |