class CitaEdoc

Attributes

acceso[RW]
edicion[RW]
editor[RW]
enlace[RW]
tipomedio[RW]

Public Class Methods

new(author, date, titulo, edicion, tipomedio, editorial, enlace,acceso) click to toggle source
Calls superclass method Cita::new
# File lib/lpp_Grupo3/cita.rb, line 184
def initialize(author, date, titulo, edicion, tipomedio, editorial, enlace,acceso)
    super(author, date, titulo)
    self.edicion=edicion
    self.tipomedio=tipomedio
    self.editor=editorial
    self.enlace=enlace
    self.acceso=acceso
end

Public Instance Methods

edoc(datos = {}) click to toggle source
# File lib/lpp_Grupo3/cita.rb, line 193
def edoc(datos = {})
    self.titulo=datos[:titulo]
    self.edicion=datos[:edicion]
    self.tipomedio=datos[:medio]
    self.editor=datos[:editor]
    self.enlace=datos[:enlace]
    self.acceso=datos[:acceso]
end
to_s() click to toggle source
# File lib/lpp_Grupo3/cita.rb, line 212
def to_s
    text=""
    for i in (0..self.author.size-2)
        text << " #{self.author[i][0]}, #{(self.author[i][1])[0]}. &"
    end
    text << " #{self.author[self.author.size-1][0]}, #{(self.author[self.author.size-1][1])[0]}."
    text << " (#{self.datey}"
    if (self.sufijo>0)
       text << (self.sufijo+96).chr 
    end
    text << "). #{self.titulo} "
    text << "(#{self.edicion}). "
    text << "[#{self.tipomedio}]."
    text << " #{self.editor}. "
    text << "#{self.enlace}. "
    text << "[#{self.acceso}]."
    text
end