Class: LolApi::HistoryMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/lol_api/types/history_match.rb

Direct Known Subclasses

Match

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_match) ⇒ HistoryMatch

Returns a new instance of HistoryMatch.



7
8
9
# File 'lib/lol_api/types/history_match.rb', line 7

def initialize(raw_match)
	@raw_match = raw_match
end

Instance Attribute Details

#raw_matchObject (readonly)

Returns the value of attribute raw_match.



5
6
7
# File 'lib/lol_api/types/history_match.rb', line 5

def raw_match
  @raw_match
end

Instance Method Details

#map_idObject



11
12
13
# File 'lib/lol_api/types/history_match.rb', line 11

def map_id
	raw_match['mapId']
end

#match_creationObject



15
16
17
# File 'lib/lol_api/types/history_match.rb', line 15

def match_creation
	raw_match['matchCreation']
end

#match_durationObject



19
20
21
# File 'lib/lol_api/types/history_match.rb', line 19

def match_duration
	raw_match['matchDuration']
end

#match_idObject



23
24
25
# File 'lib/lol_api/types/history_match.rb', line 23

def match_id
	raw_match['matchId']
end

#match_versionObject



27
28
29
# File 'lib/lol_api/types/history_match.rb', line 27

def match_version
	raw_match['matchVersion']
end

#participant_identitiesObject



31
32
33
34
35
36
37
# File 'lib/lol_api/types/history_match.rb', line 31

def participant_identities
	if participants = raw_match['participantIdentities']
		participants.map do |participant|
			ParticipantIdentity.new(participant) 
		end
	end
end

#participantsObject



39
40
41
42
43
44
45
# File 'lib/lol_api/types/history_match.rb', line 39

def participants
	if participants = raw_match['participants']
		participants.map do |participant|
			Participant.new(participant)
		end
	end
end

#queue_typeObject



47
48
49
# File 'lib/lol_api/types/history_match.rb', line 47

def queue_type
	raw_match['queueType']
end

#regionObject



51
52
53
# File 'lib/lol_api/types/history_match.rb', line 51

def region
	raw_match['region']
end

#seasonObject



55
56
57
# File 'lib/lol_api/types/history_match.rb', line 55

def season
	raw_match['season']
end