Class: LeagueOfLegends::DTO::Player

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_idObject (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_idObject (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_idObject (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

.versionObject



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

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