Class: MarvelCharactersCliGemEthel::Characters
- Inherits:
-
Object
- Object
- MarvelCharactersCliGemEthel::Characters
- Defined in:
- lib/marvel_characters_cli_gem_ethel/characters.rb
Constant Summary collapse
- @@character_array =
[]
Instance Attribute Summary collapse
-
#character_type ⇒ Object
Returns the value of attribute character_type.
-
#list_of_powers ⇒ Object
Returns the value of attribute list_of_powers.
-
#number ⇒ Object
Returns the value of attribute number.
-
#number_of_powers ⇒ Object
Returns the value of attribute number_of_powers.
-
#real_name ⇒ Object
Returns the value of attribute real_name.
-
#super_name ⇒ Object
Returns the value of attribute super_name.
Class Method Summary collapse
- .get_character_type ⇒ Object
- .get_list_of_powers ⇒ Object
- .get_number_of_powers ⇒ Object
- .get_real_name ⇒ Object
- .get_super_name ⇒ Object
Instance Method Summary collapse
-
#initialize(number = nil, super_name = nil, real_name = nil, character_type = nil, number_of_powers = nil, list_of_powers) ⇒ Characters
constructor
A new instance of Characters.
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_type ⇒ Object
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_powers ⇒ Object
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 |
#number ⇒ Object
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_powers ⇒ Object
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_name ⇒ Object
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_name ⇒ Object
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_type ⇒ Object
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_powers ⇒ Object
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_powers ⇒ Object
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_name ⇒ Object
23 24 25 |
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 23 def self.get_real_name @@real_name end |
.get_super_name ⇒ Object
19 20 21 |
# File 'lib/marvel_characters_cli_gem_ethel/characters.rb', line 19 def self.get_super_name @@super_name end |