Class: LeagueOfLegends::DTO::Player
- Inherits:
-
Object
- Object
- LeagueOfLegends::DTO::Player
- Defined in:
- lib/league_of_legends/dto/player.rb
Instance Attribute Summary collapse
-
#champion_id ⇒ Object
readonly
Returns the value of attribute champion_id.
-
#summoner_id ⇒ Object
readonly
Returns the value of attribute summoner_id.
-
#team_id ⇒ Object
readonly
Returns the value of attribute team_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(attributes) ⇒ Player
Returns a new instance of Player.
11 12 13 14 15 16 17 |
# File 'lib/league_of_legends/dto/player.rb', line 11 def initialize attributes return if attributes.nil? @champion_id = attributes[:championId].to_i @summoner_id = attributes[:summonerId].to_i @team_id = attributes[:teamId].to_i end |
Instance Attribute Details
#champion_id ⇒ Object (readonly)
Returns the value of attribute champion_id.
9 10 11 |
# File 'lib/league_of_legends/dto/player.rb', line 9 def champion_id @champion_id end |
#summoner_id ⇒ Object (readonly)
Returns the value of attribute summoner_id.
9 10 11 |
# File 'lib/league_of_legends/dto/player.rb', line 9 def summoner_id @summoner_id end |
#team_id ⇒ Object (readonly)
Returns the value of attribute team_id.
9 10 11 |
# File 'lib/league_of_legends/dto/player.rb', line 9 def team_id @team_id end |
Class Method Details
.version ⇒ Object
5 6 7 |
# File 'lib/league_of_legends/dto/player.rb', line 5 def self.version ::LeagueOfLegends::DTO::RecentGames.version end |