Class: LeagueOfLegends::DTO::RawStats

Inherits:
Object
  • Object
show all
Defined in:
lib/league_of_legends/dto/raw_stats.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ RawStats

Returns a new instance of RawStats.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/league_of_legends/dto/raw_stats.rb', line 30

def initialize attributes
  return if attributes.nil?

  @assists = attributes[:assists].to_i
  @barracks_killed = attributes[:barracksKilled].to_i
  @champions_killed = attributes[:championsKilled].to_i
  @combat_player_score = attributes[:combatPlayerScore].to_i
  @consumables_purchased = attributes[:consumablesPurchased].to_i
  @damage_dealt_player = attributes[:damageDealtPlayer].to_i
  @double_kills = attributes[:doubleKills].to_i
  @first_blood = attributes[:firstBlood].to_i
  @gold = attributes[:gold].to_i
  @gold_earned = attributes[:goldEarned].to_i
  @gold_spent = attributes[:goldSpent].to_i
  @item_0 = attributes[:item0].to_i
  @item_1 = attributes[:item1].to_i
  @item_2 = attributes[:item2].to_i
  @item_3 = attributes[:item3].to_i
  @item_4 = attributes[:item4].to_i
  @item_5 = attributes[:item5].to_i
  @item_6 = attributes[:item6].to_i
  @items_purchased = attributes[:itemsPurchased].to_i
  @killing_sprees = attributes[:killingSprees].to_i
  @largest_critical_strike = attributes[:largestCriticalStrike].to_i
  @largest_killing_spree = attributes[:largestKillingSpree].to_i
  @largest_multi_kill = attributes[:largestMultiKill].to_i
  @legendary_items_created = attributes[:legendaryItemsCreated].to_i
  @level = attributes[:level].to_i
  @magic_damage_dealt_player = attributes[:magicDamageDealtPlayer].to_i
  @magic_damage_dealt_to_champions = attributes[:magicDamageDealtToChampions].to_i
  @magic_damage_taken = attributes[:magicDamageTaken].to_i
  @minions_denied = attributes[:minionsDenied].to_i
  @minions_killed = attributes[:minionsKilled].to_i
  @neutral_minions_killed = attributes[:neutralMinionsKilled].to_i
  @neutral_minions_killed_enemy_jungle = attributes[:neutralMinionsKilledEnemyJungle].to_i
  @neutral_minions_killed_your_jungle = attributes[:neutralMinionsKilledYourJungle].to_i
  @nexus_killed = attributes[:nexusKilled]
  @node_capture = attributes[:nodeCapture].to_i
  @node_capture_assist = attributes[:nodeCaptureAssist].to_i
  @node_neutralize = attributes[:nodeNeutralize].to_i
  @node_neutralize_assist = attributes[:nodeNeutralizeAssist].to_i
  @num_deaths = attributes[:numDeaths].to_i
  @num_items_bought = attributes[:numItemsBought].to_i
  @objective_player_score = attributes[:objectivePlayerScore].to_i
  @penta_kills = attributes[:pentaKills].to_i
  @physical_damage_dealt_player = attributes[:physicalDamageDealtPlayer].to_i
  @physical_damage_dealt_to_champions = attributes[:physicalDamageDealtToChampions].to_i
  @physical_damage_taken = attributes[:physicalDamageTaken].to_i
  @quadra_kills = attributes[:quadraKills].to_i
  @sight_wards_bought = attributes[:sightWardsBought].to_i
  @spell_1_cast = attributes[:spell1Cast].to_i
  @spell_2_cast = attributes[:spell2Cast].to_i
  @spell_3_cast = attributes[:spell3Cast].to_i
  @spell_4_cast = attributes[:spell4Cast].to_i
  @summon_spell_1_cast = attributes[:summonSpell1Cast].to_i
  @summon_spell_2_cast = attributes[:summonSpell2Cast].to_i
  @super_monster_killed = attributes[:superMonsterKilled].to_i
  @team = attributes[:team].to_i
  @team_objective = attributes[:teamObjective].to_i
  @time_played = attributes[:timePlayed].to_i
  @total_damage_dealt = attributes[:totalDamageDealt].to_i
  @total_damage_dealt_to_champions = attributes[:totalDamageDealtToChampions].to_i
  @total_damage_taken = attributes[:totalDamageTaken].to_i
  @total_heal = attributes[:totalHeal].to_i
  @total_player_score = attributes[:totalPlayerScore].to_i
  @total_score_rank = attributes[:totalScoreRank].to_i
  @total_time_crowd_control_dealt = attributes[:totalTimeCrowdControlDealt].to_i
  @total_units_healed = attributes[:totalUnitsHealed].to_i
  @triple_kills = attributes[:tripleKills].to_i
  @true_damage_dealt_player = attributes[:trueDamageDealtPlayer].to_i
  @true_damage_dealt_to_champions = attributes[:trueDamageDealtToChampions].to_i
  @true_damage_taken = attributes[:trueDamageTaken].to_i
  @turrets_killed = attributes[:turretsKilled].to_i
  @unreal_kills = attributes[:unrealKills].to_i
  @victory_point_total = attributes[:victoryPointTotal].to_i
  @vision_wards_bought = attributes[:visionWardsBought].to_i
  @ward_killed = attributes[:wardKilled].to_i
  @ward_placed = attributes[:wardPlaced].to_i
  @win = attributes[:win]
end

Instance Attribute Details

#assistsObject (readonly)

Returns the value of attribute assists.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def assists
  @assists
end

#barracks_killedObject (readonly)

Returns the value of attribute barracks_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def barracks_killed
  @barracks_killed
end

#champions_killedObject (readonly)

Returns the value of attribute champions_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def champions_killed
  @champions_killed
end

#combat_player_scoreObject (readonly)

Returns the value of attribute combat_player_score.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def combat_player_score
  @combat_player_score
end

#consumables_purchasedObject (readonly)

Returns the value of attribute consumables_purchased.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def consumables_purchased
  @consumables_purchased
end

#damage_dealt_playerObject (readonly)

Returns the value of attribute damage_dealt_player.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def damage_dealt_player
  @damage_dealt_player
end

#double_killsObject (readonly)

Returns the value of attribute double_kills.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def double_kills
  @double_kills
end

#first_bloodObject (readonly)

Returns the value of attribute first_blood.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def first_blood
  @first_blood
end

#goldObject (readonly)

Returns the value of attribute gold.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def gold
  @gold
end

#gold_earnedObject (readonly)

Returns the value of attribute gold_earned.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def gold_earned
  @gold_earned
end

#gold_spentObject (readonly)

Returns the value of attribute gold_spent.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def gold_spent
  @gold_spent
end

#item_0Object (readonly)

Returns the value of attribute item_0.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_0
  @item_0
end

#item_1Object (readonly)

Returns the value of attribute item_1.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_1
  @item_1
end

#item_2Object (readonly)

Returns the value of attribute item_2.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_2
  @item_2
end

#item_3Object (readonly)

Returns the value of attribute item_3.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_3
  @item_3
end

#item_4Object (readonly)

Returns the value of attribute item_4.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_4
  @item_4
end

#item_5Object (readonly)

Returns the value of attribute item_5.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_5
  @item_5
end

#item_6Object (readonly)

Returns the value of attribute item_6.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def item_6
  @item_6
end

#items_purchasedObject (readonly)

Returns the value of attribute items_purchased.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def items_purchased
  @items_purchased
end

#killing_spreesObject (readonly)

Returns the value of attribute killing_sprees.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def killing_sprees
  @killing_sprees
end

#largest_critical_strikeObject (readonly)

Returns the value of attribute largest_critical_strike.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def largest_critical_strike
  @largest_critical_strike
end

#largest_killing_spreeObject (readonly)

Returns the value of attribute largest_killing_spree.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def largest_killing_spree
  @largest_killing_spree
end

#largest_multi_killObject (readonly)

Returns the value of attribute largest_multi_kill.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def largest_multi_kill
  @largest_multi_kill
end

#legendary_items_createdObject (readonly)

Returns the value of attribute legendary_items_created.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def legendary_items_created
  @legendary_items_created
end

#levelObject (readonly)

Returns the value of attribute level.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def level
  @level
end

#magic_damage_dealt_playerObject (readonly)

Returns the value of attribute magic_damage_dealt_player.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def magic_damage_dealt_player
  @magic_damage_dealt_player
end

#magic_damage_dealt_to_championsObject (readonly)

Returns the value of attribute magic_damage_dealt_to_champions.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def magic_damage_dealt_to_champions
  @magic_damage_dealt_to_champions
end

#magic_damage_takenObject (readonly)

Returns the value of attribute magic_damage_taken.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def magic_damage_taken
  @magic_damage_taken
end

#minions_deniedObject (readonly)

Returns the value of attribute minions_denied.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def minions_denied
  @minions_denied
end

#minions_killedObject (readonly)

Returns the value of attribute minions_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def minions_killed
  @minions_killed
end

#neutral_minions_killedObject (readonly)

Returns the value of attribute neutral_minions_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def neutral_minions_killed
  @neutral_minions_killed
end

#neutral_minions_killed_enemy_jungleObject (readonly)

Returns the value of attribute neutral_minions_killed_enemy_jungle.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def neutral_minions_killed_enemy_jungle
  @neutral_minions_killed_enemy_jungle
end

#neutral_minions_killed_your_jungleObject (readonly)

Returns the value of attribute neutral_minions_killed_your_jungle.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def neutral_minions_killed_your_jungle
  @neutral_minions_killed_your_jungle
end

#nexus_killedObject (readonly)

Returns the value of attribute nexus_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def nexus_killed
  @nexus_killed
end

#node_captureObject (readonly)

Returns the value of attribute node_capture.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def node_capture
  @node_capture
end

#node_capture_assistObject (readonly)

Returns the value of attribute node_capture_assist.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def node_capture_assist
  @node_capture_assist
end

#node_neutralizeObject (readonly)

Returns the value of attribute node_neutralize.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def node_neutralize
  @node_neutralize
end

#node_neutralize_assistObject (readonly)

Returns the value of attribute node_neutralize_assist.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def node_neutralize_assist
  @node_neutralize_assist
end

#num_deathsObject (readonly)

Returns the value of attribute num_deaths.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def num_deaths
  @num_deaths
end

#num_items_boughtObject (readonly)

Returns the value of attribute num_items_bought.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def num_items_bought
  @num_items_bought
end

#objective_player_scoreObject (readonly)

Returns the value of attribute objective_player_score.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def objective_player_score
  @objective_player_score
end

#penta_killsObject (readonly)

Returns the value of attribute penta_kills.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def penta_kills
  @penta_kills
end

#physical_damage_dealt_playerObject (readonly)

Returns the value of attribute physical_damage_dealt_player.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def physical_damage_dealt_player
  @physical_damage_dealt_player
end

#physical_damage_dealt_to_championsObject (readonly)

Returns the value of attribute physical_damage_dealt_to_champions.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def physical_damage_dealt_to_champions
  @physical_damage_dealt_to_champions
end

#physical_damage_takenObject (readonly)

Returns the value of attribute physical_damage_taken.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def physical_damage_taken
  @physical_damage_taken
end

#quadra_killsObject (readonly)

Returns the value of attribute quadra_kills.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def quadra_kills
  @quadra_kills
end

#sight_wards_boughtObject (readonly)

Returns the value of attribute sight_wards_bought.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def sight_wards_bought
  @sight_wards_bought
end

#spell_1_castObject (readonly)

Returns the value of attribute spell_1_cast.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def spell_1_cast
  @spell_1_cast
end

#spell_2_castObject (readonly)

Returns the value of attribute spell_2_cast.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def spell_2_cast
  @spell_2_cast
end

#spell_3_castObject (readonly)

Returns the value of attribute spell_3_cast.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def spell_3_cast
  @spell_3_cast
end

#spell_4_castObject (readonly)

Returns the value of attribute spell_4_cast.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def spell_4_cast
  @spell_4_cast
end

#summon_spell_1_castObject (readonly)

Returns the value of attribute summon_spell_1_cast.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def summon_spell_1_cast
  @summon_spell_1_cast
end

#summon_spell_2_castObject (readonly)

Returns the value of attribute summon_spell_2_cast.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def summon_spell_2_cast
  @summon_spell_2_cast
end

#super_monster_killedObject (readonly)

Returns the value of attribute super_monster_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def super_monster_killed
  @super_monster_killed
end

#teamObject (readonly)

Returns the value of attribute team.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def team
  @team
end

#team_objectiveObject (readonly)

Returns the value of attribute team_objective.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def team_objective
  @team_objective
end

#time_playedObject (readonly)

Returns the value of attribute time_played.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def time_played
  @time_played
end

#total_damage_dealtObject (readonly)

Returns the value of attribute total_damage_dealt.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_damage_dealt
  @total_damage_dealt
end

#total_damage_dealt_to_championsObject (readonly)

Returns the value of attribute total_damage_dealt_to_champions.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_damage_dealt_to_champions
  @total_damage_dealt_to_champions
end

#total_damage_takenObject (readonly)

Returns the value of attribute total_damage_taken.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_damage_taken
  @total_damage_taken
end

#total_healObject (readonly)

Returns the value of attribute total_heal.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_heal
  @total_heal
end

#total_player_scoreObject (readonly)

Returns the value of attribute total_player_score.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_player_score
  @total_player_score
end

#total_score_rankObject (readonly)

Returns the value of attribute total_score_rank.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_score_rank
  @total_score_rank
end

#total_time_crowd_control_dealtObject (readonly)

Returns the value of attribute total_time_crowd_control_dealt.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_time_crowd_control_dealt
  @total_time_crowd_control_dealt
end

#total_units_healedObject (readonly)

Returns the value of attribute total_units_healed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def total_units_healed
  @total_units_healed
end

#triple_killsObject (readonly)

Returns the value of attribute triple_kills.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def triple_kills
  @triple_kills
end

#true_damage_dealt_playerObject (readonly)

Returns the value of attribute true_damage_dealt_player.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def true_damage_dealt_player
  @true_damage_dealt_player
end

#true_damage_dealt_to_championsObject (readonly)

Returns the value of attribute true_damage_dealt_to_champions.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def true_damage_dealt_to_champions
  @true_damage_dealt_to_champions
end

#true_damage_takenObject (readonly)

Returns the value of attribute true_damage_taken.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def true_damage_taken
  @true_damage_taken
end

#turrets_killedObject (readonly)

Returns the value of attribute turrets_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def turrets_killed
  @turrets_killed
end

#unreal_killsObject (readonly)

Returns the value of attribute unreal_kills.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def unreal_kills
  @unreal_kills
end

#victory_point_totalObject (readonly)

Returns the value of attribute victory_point_total.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def victory_point_total
  @victory_point_total
end

#vision_wards_boughtObject (readonly)

Returns the value of attribute vision_wards_bought.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def vision_wards_bought
  @vision_wards_bought
end

#ward_killedObject (readonly)

Returns the value of attribute ward_killed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def ward_killed
  @ward_killed
end

#ward_placedObject (readonly)

Returns the value of attribute ward_placed.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def ward_placed
  @ward_placed
end

#winObject (readonly)

Returns the value of attribute win.



9
10
11
# File 'lib/league_of_legends/dto/raw_stats.rb', line 9

def win
  @win
end

Class Method Details

.versionObject



5
6
7
# File 'lib/league_of_legends/dto/raw_stats.rb', line 5

def self.version
  ::LeagueOfLegends::DTO::RecentGames.version
end