Class: RiotKit::Models::Riot::MatchTeam

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(team_id:, win:, kills:, deaths:, assists:, baron_kills:, dragon_kills:, tower_kills:, inhibitor_kills:, rift_herald_kills:) ⇒ MatchTeam

Returns a new instance of MatchTeam.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/riot_kit/models/riot/match_team.rb', line 11

def initialize(team_id:, win:, kills:, deaths:, assists:,
               baron_kills:, dragon_kills:, tower_kills:,
               inhibitor_kills:, rift_herald_kills:)
  @team_id = team_id
  @win = win
  @kills = kills
  @deaths = deaths
  @assists = assists
  @baron_kills = baron_kills
  @dragon_kills = dragon_kills
  @tower_kills = tower_kills
  @inhibitor_kills = inhibitor_kills
  @rift_herald_kills = rift_herald_kills
end

Instance Attribute Details

#assistsObject (readonly)

Returns the value of attribute assists.



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

def assists
  @assists
end

#baron_killsObject (readonly)

Returns the value of attribute baron_kills.



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

def baron_kills
  @baron_kills
end

#deathsObject (readonly)

Returns the value of attribute deaths.



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

def deaths
  @deaths
end

#dragon_killsObject (readonly)

Returns the value of attribute dragon_kills.



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

def dragon_kills
  @dragon_kills
end

#inhibitor_killsObject (readonly)

Returns the value of attribute inhibitor_kills.



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

def inhibitor_kills
  @inhibitor_kills
end

#killsObject (readonly)

Returns the value of attribute kills.



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

def kills
  @kills
end

#rift_herald_killsObject (readonly)

Returns the value of attribute rift_herald_kills.



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

def rift_herald_kills
  @rift_herald_kills
end

#team_idObject (readonly)

Returns the value of attribute team_id.



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

def team_id
  @team_id
end

#tower_killsObject (readonly)

Returns the value of attribute tower_kills.



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

def tower_kills
  @tower_kills
end

#winObject (readonly)

Returns the value of attribute win.



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

def win
  @win
end

Instance Method Details

#to_hObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/riot_kit/models/riot/match_team.rb', line 26

def to_h
  {
    team_id: team_id,
    win: win,
    kills: kills,
    deaths: deaths,
    assists: assists,
    baron_kills: baron_kills,
    dragon_kills: dragon_kills,
    tower_kills: tower_kills,
    inhibitor_kills: inhibitor_kills,
    rift_herald_kills: rift_herald_kills
  }
end