Class: Bibliografia::Edoc

Inherits:
Bibliografia show all
Defined in:
lib/Bibliografia/Bibliografia.rb

Instance Attribute Summary collapse

Attributes inherited from Bibliografia

#autor, #fecha_publicacion, #titulo

Instance Method Summary collapse

Methods inherited from Bibliografia

#<=>

Constructor Details

#initialize(titulo, &bloque) ⇒ Edoc

Returns a new instance of Edoc.



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

def initialize(titulo, &bloque)
	@autor = []
          @fecha_publicacion = []
          @titulo = titulo
          @edicion = []	
          @tipo_medio = []
          @lpublicacion = []
          @editor = []
          @source = []
          @fechacceso = []
          
          if block_given?  
      if bloque.arity == 1
        yield self
      else
       instance_eval &bloque 
      end
    end
end

Instance Attribute Details

#edicionObject

Returns the value of attribute edicion.



224
225
226
# File 'lib/Bibliografia/Bibliografia.rb', line 224

def edicion
  @edicion
end

#editorObject

Returns the value of attribute editor.



224
225
226
# File 'lib/Bibliografia/Bibliografia.rb', line 224

def editor
  @editor
end

#fechaccesoObject

Returns the value of attribute fechacceso.



224
225
226
# File 'lib/Bibliografia/Bibliografia.rb', line 224

def fechacceso
  @fechacceso
end

#lpublicacionObject

Returns the value of attribute lpublicacion.



224
225
226
# File 'lib/Bibliografia/Bibliografia.rb', line 224

def lpublicacion
  @lpublicacion
end

#sourceObject

Returns the value of attribute source.



224
225
226
# File 'lib/Bibliografia/Bibliografia.rb', line 224

def source
  @source
end

#tipo_medioObject

Returns the value of attribute tipo_medio.



224
225
226
# File 'lib/Bibliografia/Bibliografia.rb', line 224

def tipo_medio
  @tipo_medio
end

Instance Method Details

#access(text, options = {}) ⇒ Object



282
283
284
285
286
# File 'lib/Bibliografia/Bibliografia.rb', line 282

def access(text, options= {})
	access = text
	access << " (#{options[:a_access]})" if options[:a_access]
	fechacceso << access
end

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



245
246
247
248
249
# File 'lib/Bibliografia/Bibliografia.rb', line 245

def author(text, options = {})
	author= text
	author << " (#{options[:a_total]})" if options[:a_total]
	autor << author
end

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



251
252
253
254
255
256
# File 'lib/Bibliografia/Bibliografia.rb', line 251

def date(text, options = {})
	date= text
	date << " (#{options[:a_date]})" if options[:a_date]
	fecha_publicacion << date
	
end

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



264
265
266
267
268
# File 'lib/Bibliografia/Bibliografia.rb', line 264

def edition(text, options = {})
	edition = text
	edition << " (#{options[:n_editions]})" if options[:n_editions]
	edicion << edition
end

#fuente(text, options = {}) ⇒ Object



288
289
290
291
292
# File 'lib/Bibliografia/Bibliografia.rb', line 288

def fuente(text, options= {})
	fuente = text
	fuente<< " (#{options[:a_fuente]})" if options[:a_fuente]
	source << fuente
end

#media(text, options = {}) ⇒ Object



294
295
296
297
298
# File 'lib/Bibliografia/Bibliografia.rb', line 294

def media(text, options= {})
	media = text
	media<< " (#{options[:a_media]})" if options[:a_media]
	tipo_medio << media
end

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



270
271
272
273
274
# File 'lib/Bibliografia/Bibliografia.rb', line 270

def place(text, options = {})
	place = text
	place << " (#{options[:a_place]})" if options[:a_place]
	lpublicacion << place
end

#the_editor(text, options = {}) ⇒ Object



276
277
278
279
280
# File 'lib/Bibliografia/Bibliografia.rb', line 276

def the_editor(text, options= {})
	the_editor = text
	the_editor << " (#{options[:a_editeur]})" if options[:a_editeur]
	editor << the_editor
end

#title(text, options = {}) ⇒ Object



258
259
260
261
262
# File 'lib/Bibliografia/Bibliografia.rb', line 258

def title(text, options = {})
	title= text
	title << " (#{options[:a_title]})" if options[:a_title]
	titulo << title
end

#to_sObject



300
301
302
303
304
305
306
# File 'lib/Bibliografia/Bibliografia.rb', line 300

def to_s()
	salida= titulo
	
	salida << ", #{autor.join(', ')}, #{fecha_publicacion.join(', ')}, #{edicion.join(', ')}, #{tipo_medio.join(', ')}, #{lpublicacion.join(', ')}, #{editor.join(', ')}, #{source.join(', ')}, #{fechacceso.join(', ')}\n\n"
	
	salida
end