Class: Sightstone::PlayerStatSummary
- Inherits:
-
Object
- Object
- Sightstone::PlayerStatSummary
- Defined in:
- lib/sightstone/player_stats_summary.rb
Overview
stat sumary for a queue
Instance Attribute Summary collapse
-
#aggregatedStats ⇒ Hash<String, Fixnum>
a hash of all stats (key) and their values.
-
#losses ⇒ Fixnum
number of lost games.
-
#modifyDate ⇒ Fixnum
date of modification as unix date.
-
#playerStatSummaryType ⇒ String
type of the stat (can be: AramUnranked5x5, CoopVsAI, OdinUnranked, RankedPremade3x3, RankedPremade5x5, RankedSolo5x5, RankedTeam3x3, RankedTeam5x5, Unranked, Unranked3x3, OneForAll5x5, FirstBlood1x1, FirstBlood2x2).
-
#wins ⇒ Fixnum
number of won game.
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayerStatSummary
constructor
A new instance of PlayerStatSummary.
Constructor Details
#initialize(data) ⇒ PlayerStatSummary
Returns a new instance of PlayerStatSummary.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/sightstone/player_stats_summary.rb', line 27 def initialize(data) @wins = data['wins'] @losses = data['losses'] @modifyDate = data['modifyDate'] @playerStatSummaryType = data['playerStatSummaryType'] @aggregatedStats = {} stat_keys = data['aggregatedStats'].keys stat_keys.each do |stat| @aggregatedStats[stat] = data['aggregatedStats'][stat] end end |
Instance Attribute Details
#aggregatedStats ⇒ Hash<String, Fixnum>
a hash of all stats (key) and their values.
24 25 26 |
# File 'lib/sightstone/player_stats_summary.rb', line 24 def aggregatedStats @aggregatedStats end |
#losses ⇒ Fixnum
number of lost games
24 25 26 |
# File 'lib/sightstone/player_stats_summary.rb', line 24 def losses @losses end |
#modifyDate ⇒ Fixnum
date of modification as unix date
24 25 26 |
# File 'lib/sightstone/player_stats_summary.rb', line 24 def modifyDate @modifyDate end |
#playerStatSummaryType ⇒ String
type of the stat (can be: AramUnranked5x5, CoopVsAI, OdinUnranked, RankedPremade3x3, RankedPremade5x5, RankedSolo5x5, RankedTeam3x3, RankedTeam5x5, Unranked, Unranked3x3, OneForAll5x5, FirstBlood1x1, FirstBlood2x2)
24 25 26 |
# File 'lib/sightstone/player_stats_summary.rb', line 24 def playerStatSummaryType @playerStatSummaryType end |
#wins ⇒ Fixnum
number of won game
24 25 26 |
# File 'lib/sightstone/player_stats_summary.rb', line 24 def wins @wins end |