Class: RecentGames::Game
- Inherits:
-
Object
- Object
- RecentGames::Game
- Defined in:
- lib/LoLStat/RecentGames.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#gameId ⇒ Object
readonly
Returns the value of attribute gameId.
Instance Method Summary collapse
-
#initialize(game_list, game_num) ⇒ Game
constructor
A new instance of Game.
Constructor Details
#initialize(game_list, game_num) ⇒ Game
Returns a new instance of Game.
12 13 14 15 |
# File 'lib/LoLStat/RecentGames.rb', line 12 def initialize(game_list, game_num) @data = game_list["games"][game_num] @gameId = @data["gameId"] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/LoLStat/RecentGames.rb', line 11 def data @data end |
#gameId ⇒ Object (readonly)
Returns the value of attribute gameId.
11 12 13 |
# File 'lib/LoLStat/RecentGames.rb', line 11 def gameId @gameId end |