Class: NFL::LiveUpdate::GameCenter::PlayerStat

Inherits:
Object
  • Object
show all
Defined in:
lib/nfl/live_update/game_center/player_stat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, json) ⇒ PlayerStat

Returns a new instance of PlayerStat.



8
9
10
11
12
# File 'lib/nfl/live_update/game_center/player_stat.rb', line 8

def initialize(key, json)
  @player_id = key
  @player_name = json.delete("name")
  @stats = json
end

Instance Attribute Details

#player_idObject

Returns the value of attribute player_id.



6
7
8
# File 'lib/nfl/live_update/game_center/player_stat.rb', line 6

def player_id
  @player_id
end

#player_nameObject

Returns the value of attribute player_name.



6
7
8
# File 'lib/nfl/live_update/game_center/player_stat.rb', line 6

def player_name
  @player_name
end

#statsObject

Returns the value of attribute stats.



6
7
8
# File 'lib/nfl/live_update/game_center/player_stat.rb', line 6

def stats
  @stats
end