Class: NFL::LiveUpdate::GameCenter::PlayerStat
- Inherits:
-
Object
- Object
- NFL::LiveUpdate::GameCenter::PlayerStat
- Defined in:
- lib/nfl/live_update/game_center/player_stat.rb
Instance Attribute Summary collapse
-
#player_id ⇒ Object
Returns the value of attribute player_id.
-
#player_name ⇒ Object
Returns the value of attribute player_name.
-
#stats ⇒ Object
Returns the value of attribute stats.
Instance Method Summary collapse
-
#initialize(key, json) ⇒ PlayerStat
constructor
A new instance of PlayerStat.
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_id ⇒ Object
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_name ⇒ Object
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 |
#stats ⇒ Object
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 |