Class: Starcraft2::Character

Inherits:
Object
  • Object
show all
Defined in:
lib/starcraft2/character.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Character

Returns a new instance of Character.



5
6
7
# File 'lib/starcraft2/character.rb', line 5

def initialize(options = {})
  Utils.load(self, options)
end

Instance Attribute Details

#clan_nameObject

Returns the value of attribute clan_name.



3
4
5
# File 'lib/starcraft2/character.rb', line 3

def clan_name
  @clan_name
end

#clan_tagObject

Returns the value of attribute clan_tag.



3
4
5
# File 'lib/starcraft2/character.rb', line 3

def clan_tag
  @clan_tag
end

#display_nameObject

Returns the value of attribute display_name.



3
4
5
# File 'lib/starcraft2/character.rb', line 3

def display_name
  @display_name
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/starcraft2/character.rb', line 3

def id
  @id
end

#profile_pathObject

Returns the value of attribute profile_path.



3
4
5
# File 'lib/starcraft2/character.rb', line 3

def profile_path
  @profile_path
end

#realmObject

Returns the value of attribute realm.



3
4
5
# File 'lib/starcraft2/character.rb', line 3

def realm
  @realm
end

Class Method Details

.build(characters) ⇒ Object



9
10
11
12
13
# File 'lib/starcraft2/character.rb', line 9

def self.build(characters)
  characters.map do |c|
    new(c)
  end
end