Class: Libro
Instance Attribute Summary collapse
-
#isbn(isbn) ⇒ Object
Returns the value of attribute isbn.
Attributes inherited from Biblio
#apellido, #autor, #edicion, #editorial, #fecha, #serie, #titulo
Instance Method Summary collapse
-
#initialize(&block) ⇒ Libro
constructor
A new instance of Libro.
- #to_s ⇒ Object
Methods inherited from Biblio
#<=>, #obtenautor, #obtenedicion, #obteneditorial, #obtenfecha, #obtenisbn, #obtenserie, #obtentitulo
Constructor Details
#initialize(&block) ⇒ Libro
Returns a new instance of Libro.
51 52 53 54 55 56 57 58 59 |
# File 'lib/nitz/codigo.rb', line 51 def initialize (&block) if block_given? if block.arity == 1 yield self else instance_eval &block end end end |
Instance Attribute Details
#isbn(isbn) ⇒ Object
Returns the value of attribute isbn.
49 50 51 |
# File 'lib/nitz/codigo.rb', line 49 def isbn @isbn end |
Instance Method Details
#to_s ⇒ Object
65 66 67 |
# File 'lib/nitz/codigo.rb', line 65 def to_s "ISBN: #@isbn" end |