Class: Listaa::Revista

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

Instance Attribute Summary (collapse)

Attributes inherited from Bibliografia

#Author, #Edicion, #Editorial, #Fecha_Publication, #Serie, #Title

Instance Method Summary (collapse)

Methods inherited from Bibliografia

#<=>, #add_author, #add_editorial, #add_serie, #add_title, #autor, #autorTo_s, #edicion, #editorial, #fecha, #get_formato, #get_tipo, #set_edicion, #set_publication

Constructor Details

- (Revista) initialize(nombre = "", &block)

Returns a new instance of Revista



6
7
8
9
10
11
12
# File 'lib/Lista/Revista.rb', line 6

def initialize(nombre = "",&block) super(nombre)
    @Tipo = "Revista"
    @impacto = 0
    @ISSN = 00000000
    
    instance_eval &block 
end

Instance Attribute Details

- (Object) impacto

Returns the value of attribute impacto



5
6
7
# File 'lib/Lista/Revista.rb', line 5

def impacto
  @impacto
end

- (Object) ISSN

Returns the value of attribute ISSN



5
6
7
# File 'lib/Lista/Revista.rb', line 5

def ISSN
  @ISSN
end

Instance Method Details

- (Object) add_ISSN(num)



14
15
16
# File 'lib/Lista/Revista.rb', line 14

def add_ISSN(num)
    @ISSN = num
end

- (Object) titleTo_s



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/Lista/Revista.rb', line 18

def titleTo_s
    f = @Title.split
    j = ""
    f.collect{|x| if(x.size>3) 
                    j=j+x.capitalize+" "
                  else
                    j=j+x+" "
                  end
    }
    j
end

- (Object) to_s



30
31
32
# File 'lib/Lista/Revista.rb', line 30

def to_s 
    f = autorTo_s+"("+@Fecha_Publication.to_s+"). "+titleTo_s+"("+@Edicion.to_s+"). "+@Editorial
end