Class: Starcraft2::Profile::Stats

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Stats

Returns a new instance of Stats.



6
7
8
# File 'lib/starcraft2/profile/stats.rb', line 6

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

Instance Attribute Details

#gamesObject

Returns the value of attribute games.



4
5
6
# File 'lib/starcraft2/profile/stats.rb', line 4

def games
  @games
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/starcraft2/profile/stats.rb', line 4

def type
  @type
end

#winsObject

Returns the value of attribute wins.



4
5
6
# File 'lib/starcraft2/profile/stats.rb', line 4

def wins
  @wins
end

Class Method Details

.build(stats) ⇒ Object



10
11
12
13
14
# File 'lib/starcraft2/profile/stats.rb', line 10

def self.build(stats)
  stats.map do |s|
    new(s)
  end
end