Class: LolesportsApi::Play
- Inherits:
-
Object
- Object
- LolesportsApi::Play
- Defined in:
- lib/lolesports-api/play.rb
Instance Attribute Summary collapse
-
#assists ⇒ Object
readonly
Returns the value of attribute assists.
-
#champion_id ⇒ Object
readonly
Returns the value of attribute champion_id.
-
#deaths ⇒ Object
readonly
Returns the value of attribute deaths.
-
#end_level ⇒ Object
readonly
Returns the value of attribute end_level.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#kda ⇒ Object
readonly
Returns the value of attribute kda.
-
#kills ⇒ Object
readonly
Returns the value of attribute kills.
-
#minions_killed ⇒ Object
readonly
Returns the value of attribute minions_killed.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#photo_url ⇒ Object
readonly
Returns the value of attribute photo_url.
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#player_id ⇒ Object
readonly
Returns the value of attribute player_id.
-
#spell0 ⇒ Object
readonly
Returns the value of attribute spell0.
-
#spell1 ⇒ Object
readonly
Returns the value of attribute spell1.
-
#team_id ⇒ Object
readonly
Returns the value of attribute team_id.
-
#total_gold ⇒ Object
readonly
Returns the value of attribute total_gold.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Play
constructor
A new instance of Play.
Constructor Details
#initialize(attributes = {}) ⇒ Play
Returns a new instance of Play.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lolesports-api/play.rb', line 8 def initialize(attributes = {}) @assists = attributes['assists'] @champion_id = attributes['championId'] @deaths = attributes['deaths'] @end_level = attributes['endLevel'] @player_id = attributes['id'] @items = processed_items(attributes) @kda = attributes['kda'] @kills = attributes['kills'] @minions_killed = attributes['minionsKilled'] @name = attributes['name'] @photo_url = attributes['photoURL'] @spell0 = attributes['spell0'].to_i @spell1 = attributes['spell1'].to_i @team_id = attributes['teamId'] @total_gold = attributes['totalGold'] @player = prepare_player end |
Instance Attribute Details
#assists ⇒ Object (readonly)
Returns the value of attribute assists.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def assists @assists end |
#champion_id ⇒ Object (readonly)
Returns the value of attribute champion_id.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def champion_id @champion_id end |
#deaths ⇒ Object (readonly)
Returns the value of attribute deaths.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def deaths @deaths end |
#end_level ⇒ Object (readonly)
Returns the value of attribute end_level.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def end_level @end_level end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def items @items end |
#kda ⇒ Object (readonly)
Returns the value of attribute kda.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def kda @kda end |
#kills ⇒ Object (readonly)
Returns the value of attribute kills.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def kills @kills end |
#minions_killed ⇒ Object (readonly)
Returns the value of attribute minions_killed.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def minions_killed @minions_killed end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def name @name end |
#photo_url ⇒ Object (readonly)
Returns the value of attribute photo_url.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def photo_url @photo_url end |
#player ⇒ Object (readonly)
Returns the value of attribute player.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def player @player end |
#player_id ⇒ Object (readonly)
Returns the value of attribute player_id.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def player_id @player_id end |
#spell0 ⇒ Object (readonly)
Returns the value of attribute spell0.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def spell0 @spell0 end |
#spell1 ⇒ Object (readonly)
Returns the value of attribute spell1.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def spell1 @spell1 end |
#team_id ⇒ Object (readonly)
Returns the value of attribute team_id.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def team_id @team_id end |
#total_gold ⇒ Object (readonly)
Returns the value of attribute total_gold.
3 4 5 |
# File 'lib/lolesports-api/play.rb', line 3 def total_gold @total_gold end |