Class: Rito::Match::Participant

Inherits:
ApiBase
  • Object
show all
Defined in:
lib/rito/match/participant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiBase

#attributes=, call_api, from_list, from_map, from_map_of_lists

Constructor Details

#initialize(attributes = {}) ⇒ Participant

Returns a new instance of Participant


14
15
16
17
18
19
20
# File 'lib/rito/match/participant.rb', line 14

def initialize(attributes = {})
	self.masteries = Rito::Match::Mastery.from_list(attributes.delete('masteries')) if attributes['masteries']
	self.runes = Rito::Match::Rune.from_list(attributes.delete('runes')) if attributes['runes']
	self.stats = Rito::Match::ParticipantStats.new(attributes.delete('stats')) if attributes['stats']
	self.timeline = Rito::Match::ParticipantTimeline.new(attributes.delete('timeline')) if attributes['timeline']
	super
end

Instance Attribute Details

#championIdObject

Returns the value of attribute championId


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def championId
  @championId
end

#highestAchievedSeasonTierObject

Returns the value of attribute highestAchievedSeasonTier


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def highestAchievedSeasonTier
  @highestAchievedSeasonTier
end

#masteriesObject

Returns the value of attribute masteries


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def masteries
  @masteries
end

#participantIdObject

Returns the value of attribute participantId


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def participantId
  @participantId
end

#runesObject

Returns the value of attribute runes


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def runes
  @runes
end

#spell1IdObject

Returns the value of attribute spell1Id


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def spell1Id
  @spell1Id
end

#spell2IdObject

Returns the value of attribute spell2Id


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def spell2Id
  @spell2Id
end

#statsObject

Returns the value of attribute stats


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def stats
  @stats
end

#teamIdObject

Returns the value of attribute teamId


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def teamId
  @teamId
end

#timelineObject

Returns the value of attribute timeline


3
4
5
# File 'lib/rito/match/participant.rb', line 3

def timeline
  @timeline
end