Class: Wot::Player::Statistics

Inherits:
Object
  • Object
show all
Defined in:
lib/wot/player/statistics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Statistics

Returns a new instance of Statistics.



7
8
9
10
11
12
13
14
15
# File 'lib/wot/player/statistics.rb', line 7

def initialize(data)
  @data = data
  @max_damage = data[:max_damage]
  @max_xp = data[:max_xp]
  @all = Wot::Player::ExtendedStatistics.new(@data[:all])
  @clan = Wot::Player::ExtendedStatistics.new(@data[:clan])
  @company = Wot::Player::ExtendedStatistics.new(@data[:company])
  @historical = Wot::Player::ExtendedStatistics.new(@data[:historical])
end

Instance Attribute Details

#allObject

Returns the value of attribute all.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def all
  @all
end

#clanObject

Returns the value of attribute clan.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def clan
  @clan
end

#companyObject

Returns the value of attribute company.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def company
  @company
end

#dataObject

Returns the value of attribute data.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def data
  @data
end

#historicalObject

Returns the value of attribute historical.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def historical
  @historical
end

#max_damageObject

Returns the value of attribute max_damage.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def max_damage
  @max_damage
end

#max_xpObject

Returns the value of attribute max_xp.



5
6
7
# File 'lib/wot/player/statistics.rb', line 5

def max_xp
  @max_xp
end