Class: RiotKit::Models::Riot::MatchDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/riot_kit/models/riot/match_detail.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(match_id:, game_duration_seconds:, queue_id:, queue_label:, game_creation:, teams:, participants:) ⇒ MatchDetail

Returns a new instance of MatchDetail.



10
11
12
13
14
15
16
17
18
19
# File 'lib/riot_kit/models/riot/match_detail.rb', line 10

def initialize(match_id:, game_duration_seconds:, queue_id:, queue_label:,
               game_creation:, teams:, participants:)
  @match_id = match_id
  @game_duration_seconds = game_duration_seconds
  @queue_id = queue_id
  @queue_label = queue_label
  @game_creation = game_creation
  @teams = teams
  @participants = participants
end

Instance Attribute Details

#game_creationObject (readonly)

Returns the value of attribute game_creation.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def game_creation
  @game_creation
end

#game_duration_secondsObject (readonly)

Returns the value of attribute game_duration_seconds.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def game_duration_seconds
  @game_duration_seconds
end

#match_idObject (readonly)

Returns the value of attribute match_id.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def match_id
  @match_id
end

#participantsObject (readonly)

Returns the value of attribute participants.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def participants
  @participants
end

#queue_idObject (readonly)

Returns the value of attribute queue_id.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def queue_id
  @queue_id
end

#queue_labelObject (readonly)

Returns the value of attribute queue_label.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def queue_label
  @queue_label
end

#teamsObject (readonly)

Returns the value of attribute teams.



7
8
9
# File 'lib/riot_kit/models/riot/match_detail.rb', line 7

def teams
  @teams
end

Instance Method Details

#to_hObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/riot_kit/models/riot/match_detail.rb', line 21

def to_h
  {
    match_id: match_id,
    game_duration_seconds: game_duration_seconds,
    queue_id: queue_id,
    queue_label: queue_label,
    game_creation: game_creation,
    teams: teams.map(&:to_h),
    participants: participants.map(&:to_h)
  }
end