Class: LeagueOfLegends::DTO::RecentGames
- Defined in:
- lib/league_of_legends/dto/recent_games.rb
Instance Attribute Summary collapse
-
#games ⇒ Object
readonly
Returns the value of attribute games.
-
#summoner_id ⇒ Object
readonly
Returns the value of attribute summoner_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ RecentGames
constructor
A new instance of RecentGames.
Constructor Details
#initialize(json) ⇒ RecentGames
14 15 16 17 18 19 20 21 |
# File 'lib/league_of_legends/dto/recent_games.rb', line 14 def initialize json attributes = build_attributes json @games = attributes[:games].map do |game| ::LeagueOfLegends::DTO::Game.new(game) end @summoner_id = attributes[:summonerId] end |
Instance Attribute Details
#games ⇒ Object (readonly)
Returns the value of attribute games.
12 13 14 |
# File 'lib/league_of_legends/dto/recent_games.rb', line 12 def games @games end |
#summoner_id ⇒ Object (readonly)
Returns the value of attribute summoner_id.
12 13 14 |
# File 'lib/league_of_legends/dto/recent_games.rb', line 12 def summoner_id @summoner_id end |
Class Method Details
.version ⇒ Object
8 9 10 |
# File 'lib/league_of_legends/dto/recent_games.rb', line 8 def self.version 'v1.3' end |