Class: Libro
Instance Attribute Summary collapse
-
#edicion ⇒ Object
Returns the value of attribute edicion.
-
#edito ⇒ Object
Returns the value of attribute edito.
-
#lpublicacion ⇒ Object
Returns the value of attribute lpublicacion.
-
#volumen ⇒ Object
Returns the value of attribute volumen.
Attributes inherited from Biblio
Instance Method Summary collapse
- #author(name, options = {}) ⇒ Object
- #date(name, options = {}) ⇒ Object
- #edition(name, options = {}) ⇒ Object
- #editor(name, options = {}) ⇒ Object
-
#initialize(titulo, &block) ⇒ Libro
constructor
A new instance of Libro.
- #place(name, options = {}) ⇒ Object
- #volume(name, options = {}) ⇒ Object
Methods inherited from Biblio
Constructor Details
#initialize(titulo, &block) ⇒ Libro
Returns a new instance of Libro.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bibliografia/biblio.rb', line 59 def initialize(titulo,&block) self.titulo = titulo self.autor = [] self.fecha = [] self.edicion = [] self.volumen = [] self.lpublicacion = [] self.edito = [] if block_given? if block.arity == 1 yield self else instance_eval &block end end end |
Instance Attribute Details
#edicion ⇒ Object
Returns the value of attribute edicion.
57 58 59 |
# File 'lib/bibliografia/biblio.rb', line 57 def edicion @edicion end |
#edito ⇒ Object
Returns the value of attribute edito.
57 58 59 |
# File 'lib/bibliografia/biblio.rb', line 57 def edito @edito end |
#lpublicacion ⇒ Object
Returns the value of attribute lpublicacion.
57 58 59 |
# File 'lib/bibliografia/biblio.rb', line 57 def lpublicacion @lpublicacion end |
#volumen ⇒ Object
Returns the value of attribute volumen.
57 58 59 |
# File 'lib/bibliografia/biblio.rb', line 57 def volumen @volumen end |
Instance Method Details
#author(name, options = {}) ⇒ Object
84 85 86 87 |
# File 'lib/bibliografia/biblio.rb', line 84 def (name, = {}) = name autor << end |
#date(name, options = {}) ⇒ Object
79 80 81 82 |
# File 'lib/bibliografia/biblio.rb', line 79 def date(name, = {}) date = name fecha << date end |
#edition(name, options = {}) ⇒ Object
89 90 91 92 |
# File 'lib/bibliografia/biblio.rb', line 89 def edition(name, = {}) edition = name edicion << edition end |
#editor(name, options = {}) ⇒ Object
104 105 106 107 |
# File 'lib/bibliografia/biblio.rb', line 104 def editor(name, = {}) editor = name edito << editor end |
#place(name, options = {}) ⇒ Object
99 100 101 102 |
# File 'lib/bibliografia/biblio.rb', line 99 def place(name, = {}) place = name lpublicacion << place end |
#volume(name, options = {}) ⇒ Object
94 95 96 97 |
# File 'lib/bibliografia/biblio.rb', line 94 def volume(name, = {}) volume = name volumen << volume end |