Class: RiotKit::Models::Riot::Player::Objectives

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**attrs) ⇒ Objectives

Returns a new instance of Objectives.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 14

def initialize(**attrs)
  @turret_kills = attrs[:turret_kills]
  @turret_takedowns = attrs[:turret_takedowns]
  @inhibitor_kills = attrs[:inhibitor_kills]
  @inhibitor_takedowns = attrs[:inhibitor_takedowns]
  @baron_kills = attrs[:baron_kills]
  @baron_takedowns = attrs[:baron_takedowns]
  @dragon_kills = attrs[:dragon_kills]
  @dragon_takedowns = attrs[:dragon_takedowns]
  @rift_herald_takedowns = attrs[:rift_herald_takedowns]
  @damage_dealt_to_buildings = attrs[:damage_dealt_to_buildings]
  @damage_dealt_to_objectives = attrs[:damage_dealt_to_objectives]
  @damage_dealt_to_turrets = attrs[:damage_dealt_to_turrets]
  @first_blood_kill = attrs[:first_blood_kill]
  @first_tower_kill = attrs[:first_tower_kill]
end

Instance Attribute Details

#baron_killsObject (readonly)

Returns the value of attribute baron_kills.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def baron_kills
  @baron_kills
end

#baron_takedownsObject (readonly)

Returns the value of attribute baron_takedowns.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def baron_takedowns
  @baron_takedowns
end

#damage_dealt_to_buildingsObject (readonly)

Returns the value of attribute damage_dealt_to_buildings.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def damage_dealt_to_buildings
  @damage_dealt_to_buildings
end

#damage_dealt_to_objectivesObject (readonly)

Returns the value of attribute damage_dealt_to_objectives.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def damage_dealt_to_objectives
  @damage_dealt_to_objectives
end

#damage_dealt_to_turretsObject (readonly)

Returns the value of attribute damage_dealt_to_turrets.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def damage_dealt_to_turrets
  @damage_dealt_to_turrets
end

#dragon_killsObject (readonly)

Returns the value of attribute dragon_kills.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def dragon_kills
  @dragon_kills
end

#dragon_takedownsObject (readonly)

Returns the value of attribute dragon_takedowns.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def dragon_takedowns
  @dragon_takedowns
end

#first_blood_killObject (readonly)

Returns the value of attribute first_blood_kill.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def first_blood_kill
  @first_blood_kill
end

#first_tower_killObject (readonly)

Returns the value of attribute first_tower_kill.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def first_tower_kill
  @first_tower_kill
end

#inhibitor_killsObject (readonly)

Returns the value of attribute inhibitor_kills.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def inhibitor_kills
  @inhibitor_kills
end

#inhibitor_takedownsObject (readonly)

Returns the value of attribute inhibitor_takedowns.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def inhibitor_takedowns
  @inhibitor_takedowns
end

#rift_herald_takedownsObject (readonly)

Returns the value of attribute rift_herald_takedowns.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def rift_herald_takedowns
  @rift_herald_takedowns
end

#turret_killsObject (readonly)

Returns the value of attribute turret_kills.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def turret_kills
  @turret_kills
end

#turret_takedownsObject (readonly)

Returns the value of attribute turret_takedowns.



8
9
10
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 8

def turret_takedowns
  @turret_takedowns
end

Instance Method Details

#to_hObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/riot_kit/models/riot/player/objectives.rb', line 31

def to_h
  {
    turret_kills: turret_kills,
    turret_takedowns: turret_takedowns,
    inhibitor_kills: inhibitor_kills,
    inhibitor_takedowns: inhibitor_takedowns,
    baron_kills: baron_kills,
    baron_takedowns: baron_takedowns,
    dragon_kills: dragon_kills,
    dragon_takedowns: dragon_takedowns,
    rift_herald_takedowns: rift_herald_takedowns,
    damage_dealt_to_buildings: damage_dealt_to_buildings,
    damage_dealt_to_objectives: damage_dealt_to_objectives,
    damage_dealt_to_turrets: damage_dealt_to_turrets,
    first_blood_kill: first_blood_kill,
    first_tower_kill: first_tower_kill
  }
end