Class: Articulo

Inherits:
Biblio show all
Defined in:
lib/bibliografia/biblio.rb

Instance Attribute Summary collapse

Attributes inherited from Biblio

#autor, #fecha, #titulo

Instance Method Summary collapse

Methods inherited from Biblio

#<=>, #to_s

Constructor Details

#initialize(titulo, &block) ⇒ Articulo

Returns a new instance of Articulo.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/bibliografia/biblio.rb', line 114

def initialize(titulo,&block)

     self.titulo = titulo
     self.autor = []
     self.fecha = []   
     self.titulob = []
     self.pags = []
     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

#edicionObject

Returns the value of attribute edicion.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def edicion
  @edicion
end

#editoObject

Returns the value of attribute edito.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def edito
  @edito
end

#edsObject

Returns the value of attribute eds.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def eds
  @eds
end

#lpublicacionObject

Returns the value of attribute lpublicacion.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def lpublicacion
  @lpublicacion
end

#pagsObject

Returns the value of attribute pags.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def pags
  @pags
end

#titulobObject

Returns the value of attribute titulob.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def titulob
  @titulob
end

#volumenObject

Returns the value of attribute volumen.



113
114
115
# File 'lib/bibliografia/biblio.rb', line 113

def volumen
  @volumen
end

Instance Method Details

#author(name, options = {}) ⇒ Object



142
143
144
145
# File 'lib/bibliografia/biblio.rb', line 142

def author(name, options = {})
     author = name
     autor << author
end

#book(name, options = {}) ⇒ Object



157
158
159
160
# File 'lib/bibliografia/biblio.rb', line 157

def book(name, options = {})
     book = name
     titulob << book
end

#date(name, options = {}) ⇒ Object



137
138
139
140
# File 'lib/bibliografia/biblio.rb', line 137

def date(name, options = {})
     date = name
     fecha << date
end

#edition(name, options = {}) ⇒ Object



147
148
149
150
# File 'lib/bibliografia/biblio.rb', line 147

def edition(name, options = {})
     edition = name
     edicion << edition
end

#editor(name, options = {}) ⇒ Object



172
173
174
175
# File 'lib/bibliografia/biblio.rb', line 172

def editor(name, options = {})
     editor = name
     edito << editor
end

#pages(name, options = {}) ⇒ Object



152
153
154
155
# File 'lib/bibliografia/biblio.rb', line 152

def pages(name, options = {})
     pages = name
     pags << pages
end

#place(name, options = {}) ⇒ Object



167
168
169
170
# File 'lib/bibliografia/biblio.rb', line 167

def place(name, options = {})
     place = name
     lpublicacion << place
end

#volume(name, options = {}) ⇒ Object



162
163
164
165
# File 'lib/bibliografia/biblio.rb', line 162

def volume(name, options = {})
     volume = name
     volumen << volume
end