Class: LeagueOfLegends::DTO::RecentGames

Inherits:
Base
  • Object
show all
Defined in:
lib/league_of_legends/dto/recent_games.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#gamesObject (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_idObject (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

.versionObject



8
9
10
# File 'lib/league_of_legends/dto/recent_games.rb', line 8

def self.version
  'v1.3'
end