Class: Sightstone::MatchHistory

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/match_history.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ MatchHistory

Returns a new instance of MatchHistory.



8
9
10
11
12
13
14
# File 'lib/sightstone/match_history.rb', line 8

def initialize(data)
  @summonerId = data['summonerId']
  @games = []
  data['games'].each do |game|
    games << HistoryGame.new(game)
  end
end

Instance Attribute Details

#gamesArray<HistoryGame>

unsorted list of recently played games

Returns:



5
6
7
# File 'lib/sightstone/match_history.rb', line 5

def games
  @games
end

#summonerIdObject

Returns the value of attribute summonerId.



6
7
8
# File 'lib/sightstone/match_history.rb', line 6

def summonerId
  @summonerId
end