Class: LolApi::HistoryMatch
- Inherits:
-
Object
- Object
- LolApi::HistoryMatch
- Defined in:
- lib/lol_api/types/history_match.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#raw_match ⇒ Object
readonly
Returns the value of attribute raw_match.
Instance Method Summary collapse
-
#initialize(raw_match) ⇒ HistoryMatch
constructor
A new instance of HistoryMatch.
- #map_id ⇒ Object
- #match_creation ⇒ Object
- #match_duration ⇒ Object
- #match_id ⇒ Object
- #match_version ⇒ Object
- #participant_identities ⇒ Object
- #participants ⇒ Object
- #queue_type ⇒ Object
- #region ⇒ Object
- #season ⇒ Object
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_match ⇒ Object (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_id ⇒ Object
11 12 13 |
# File 'lib/lol_api/types/history_match.rb', line 11 def map_id raw_match['mapId'] end |
#match_creation ⇒ Object
15 16 17 |
# File 'lib/lol_api/types/history_match.rb', line 15 def match_creation raw_match['matchCreation'] end |
#match_duration ⇒ Object
19 20 21 |
# File 'lib/lol_api/types/history_match.rb', line 19 def match_duration raw_match['matchDuration'] end |
#match_id ⇒ Object
23 24 25 |
# File 'lib/lol_api/types/history_match.rb', line 23 def match_id raw_match['matchId'] end |
#match_version ⇒ Object
27 28 29 |
# File 'lib/lol_api/types/history_match.rb', line 27 def match_version raw_match['matchVersion'] end |
#participant_identities ⇒ Object
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 |
#participants ⇒ Object
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_type ⇒ Object
47 48 49 |
# File 'lib/lol_api/types/history_match.rb', line 47 def queue_type raw_match['queueType'] end |
#region ⇒ Object
51 52 53 |
# File 'lib/lol_api/types/history_match.rb', line 51 def region raw_match['region'] end |
#season ⇒ Object
55 56 57 |
# File 'lib/lol_api/types/history_match.rb', line 55 def season raw_match['season'] end |