Class: Libro

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(date, isbn, price) ⇒ Libro

Returns a new instance of Libro.



4
5
6
7
8
# File 'lib/Libro.rb', line 4

def initialize(date, isbn, price)
  @date = date
  @isbn = isbn
  @price = Float(price)
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



2
3
4
# File 'lib/Libro.rb', line 2

def date
  @date
end

#isbnObject

Returns the value of attribute isbn.



2
3
4
# File 'lib/Libro.rb', line 2

def isbn
  @isbn
end

#priceObject

Returns the value of attribute price.



2
3
4
# File 'lib/Libro.rb', line 2

def price
  @price
end