class Revista
Attributes
autor[R]
editorial[R]
issn[R]
serie[R]
Public Class Methods
new(titulo) { |self| ... }
click to toggle source
# File lib/Bib/Bib.rb, line 79 def initialize(titulo, &block) @autor = [] @titulo = titulo @serie = [] @issn = [] @editorial = [] if block_given? if block.arity == 1 yield self else instance_eval &block end end end
Public Instance Methods
b_issn(text, options = {})
click to toggle source
# File lib/Bib/Bib.rb, line 107 def b_issn(text, options = {}) b_issn = text b_issn << "(#{options[:issn]})" if options[:issn] issn << b_issn end
edit(text, options = {})
click to toggle source
# File lib/Bib/Bib.rb, line 101 def edit(text, options = {}) edit = text edit << "(#{options[:numedition]})" if options[:numedition] editorial << edit end
to_s()
click to toggle source
# File lib/Bib/Bib.rb, line 113 def to_s() output = titulo output << ", #{autor.join(', ')}, #{editorial.join(', ')}, #{issn.join(', ')}\n\n" end