class Bibliografia::Articulo

Attributes

edicion[RW]
editor[RW]
eds[RW]
lpublicacion[RW]
pags[RW]
titulo2[RW]
volumen[RW]

Public Class Methods

new(titulo) { |self| ... } click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 127
    def initialize(titulo, &bloque)
            
            @autor = []
@fecha_publicacion = []
@titulo = titulo
@eds = []
@titulo2 = []
@pags = []
@edicion = []
@volumen = []
@lpublicacion = []
@editor = []

if block_given?  
          if bloque.arity == 1
            yield self
          else
           instance_eval &bloque 
          end
        end

    end

Public Instance Methods

author(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 150
def author(text, options = {})
        author= text
        author << " (#{options[:a_total]})" if options[:a_total]
        autor << author
end
date(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 156
def date(text, options = {})
        date= text
        date << " (#{options[:a_date]})" if options[:a_date]
        fecha_publicacion << date
        
end
edition(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 176
def edition(text, options = {})
        edition = text
        edition << " (#{options[:n_editions]})" if options[:n_editions]
        edicion << edition
end
pages(text, options= {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 207
def pages(text, options= {})
        pages = text
        pages << " (#{options[:a_editeur]})" if options[:a_editeur]
        editor << pages
end
place(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 189
def place(text, options = {})
        place= text
        place << " (#{options[:a_place]})" if options[:a_place]
        lpublicacion << place
end
the_editor(text, options= {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 201
def the_editor(text, options= {})
        the_editor = text
        the_editor << " (#{options[:a_editeur]})" if options[:a_editeur]
        editor << the_editor
end
title(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 163
def title(text, options = {})
        title= text
        title << " (#{options[:a_title]})" if options[:a_title]
        titulo << title
end
title2(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 169
def title2(text, options = {})
        title2= text
        title2 << " (#{options[:a_title]})" if options[:a_title]
        titulo2 << title2
end
to_s() click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 213
def to_s()
        salida= titulo
        
        salida << ", #{autor.join(', ')}, #{fecha_publicacion.join(', ')},  #{titulo2.join(', ')},  #{editor.join(', ')}, #{edicion.join(', ')}, #{volumen.join(', ')}, #{lpublicacion.join(', ')}\n\n"
        
        salida
end
vols(text, options = {}) click to toggle source
# File lib/Bibliografia/Bibliografia.rb, line 183
def vols(text, options = {})
        vols = text
        vols << " (#{options[:n_vols]})" if options[:n_vols]
        volumen << vols 
end