Class: MarvelCharactersCliGemEthel::Characters

Inherits:
Object
  • Object
show all
Defined in:
lib/marvel_characters_cli_gem_ethel/characters.rb

Constant Summary collapse

@@character_array =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number = nil, super_name = nil, real_name = nil, character_type = nil, number_of_powers = nil, list_of_powers) ⇒ Characters

Returns a new instance of Characters.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 7

def initialize(number = nil, super_name=nil, real_name=nil, character_type=nil, number_of_powers=nil, list_of_powers)
puts "in initialize"
puts super_name
  @number = number
  @@super_name = super_name
  @@real_name = real_name
  @@character_type = character_type
  @@number_of_powers = number_of_powers
  @@list_of_powers = list_of_powers
  @@character_array << self
end

Instance Attribute Details

#character_typeObject

Returns the value of attribute character_type.



3
4
5
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 3

def character_type
  @character_type
end

#list_of_powersObject

Returns the value of attribute list_of_powers.



3
4
5
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 3

def list_of_powers
  @list_of_powers
end

#numberObject

Returns the value of attribute number.



3
4
5
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 3

def number
  @number
end

#number_of_powersObject

Returns the value of attribute number_of_powers.



3
4
5
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 3

def number_of_powers
  @number_of_powers
end

#real_nameObject

Returns the value of attribute real_name.



3
4
5
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 3

def real_name
  @real_name
end

#super_nameObject

Returns the value of attribute super_name.



3
4
5
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 3

def super_name
  @super_name
end

Class Method Details

.get_character_typeObject



27
28
29
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 27

def self.get_character_type
  @@character_type
end

.get_list_of_powersObject



35
36
37
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 35

def self.get_list_of_powers
  @@list_of_powers
end

.get_number_of_powersObject



31
32
33
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 31

def self.get_number_of_powers
  @@number_of_powers
end

.get_real_nameObject



23
24
25
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 23

def self.get_real_name
  @@real_name
end

.get_super_nameObject



19
20
21
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 19

def self.get_super_name
  @@super_name
end