Class: BookInStock

Inherits:
Object
  • Object
show all
Defined in:
lib/large_csv_reader/book_in_stock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#isbnObject (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

#priceObject

Returns the value of attribute price.



3
4
5
# File 'lib/large_csv_reader/book_in_stock.rb', line 3

def price
  @price
end