Class: Libro
- Inherits:
-
Object
- Object
- Libro
- Defined in:
- lib/Libro.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#isbn ⇒ Object
Returns the value of attribute isbn.
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(date, isbn, price) ⇒ Libro
constructor
A new instance of Libro.
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
#date ⇒ Object
Returns the value of attribute date.
2 3 4 |
# File 'lib/Libro.rb', line 2 def date @date end |
#isbn ⇒ Object
Returns the value of attribute isbn.
2 3 4 |
# File 'lib/Libro.rb', line 2 def isbn @isbn end |
#price ⇒ Object
Returns the value of attribute price.
2 3 4 |
# File 'lib/Libro.rb', line 2 def price @price end |