class Periodico
Attributes
autor[R]
edicion[R]
editor[R]
Public Class Methods
new(titulo) { |self| ... }
click to toggle source
# File lib/Bib/Bib.rb, line 125 def initialize(titulo, &block) @autor = [] @titulo = titulo @editor = [] @edicion = [] if block_given? if block.arity == 1 yield self else instance_eval &block end end end
Public Instance Methods
edit(text, options = {})
click to toggle source
# File lib/Bib/Bib.rb, line 141 def edit(text, options = {}) edit = text edit << "(#{options[:numedition]})" if options[:numedition] edicion << edit end
to_s()
click to toggle source
# File lib/Bib/Bib.rb, line 153 def to_s() output = titulo output << ", #{autor.join(', ')}, #{edicion.join(', ')}\n\n" end