Class: Electronico

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) ⇒ Electronico

Returns a new instance of Electronico.



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/bibliografia/biblio.rb', line 223

def initialize(titulo, &block)
     
     self.autor = []
     self.fecha = []
     self.titulo = titulo
     self.edicion = []
     self.tmedio = []
     self.lpublicacion = []
     self.editor = []
     self.dir = []
     
     if block_given?  
          if block.arity == 1
               yield self
          else
               instance_eval &block 
          end
     end
          
end

Instance Attribute Details

#dirObject

Returns the value of attribute dir.



221
222
223
# File 'lib/bibliografia/biblio.rb', line 221

def dir
  @dir
end

#edicionObject

Returns the value of attribute edicion.



221
222
223
# File 'lib/bibliografia/biblio.rb', line 221

def edicion
  @edicion
end

#editorObject

Returns the value of attribute editor.



221
222
223
# File 'lib/bibliografia/biblio.rb', line 221

def editor
  @editor
end

#lpublicacionObject

Returns the value of attribute lpublicacion.



221
222
223
# File 'lib/bibliografia/biblio.rb', line 221

def lpublicacion
  @lpublicacion
end

#tmedioObject

Returns the value of attribute tmedio.



221
222
223
# File 'lib/bibliografia/biblio.rb', line 221

def tmedio
  @tmedio
end

Instance Method Details

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



249
250
251
252
# File 'lib/bibliografia/biblio.rb', line 249

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

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



244
245
246
247
# File 'lib/bibliografia/biblio.rb', line 244

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

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



254
255
256
257
# File 'lib/bibliografia/biblio.rb', line 254

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

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



269
270
271
272
# File 'lib/bibliografia/biblio.rb', line 269

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

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



259
260
261
262
# File 'lib/bibliografia/biblio.rb', line 259

def type(name, options = {})
     type = name
     tmedio << type
end

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



264
265
266
267
# File 'lib/bibliografia/biblio.rb', line 264

def url(name, options = {})
     url = name
     dir << url
end