Class: LeagueOfLegends::DTO::ChampionStats
- Inherits:
-
Object
- Object
- LeagueOfLegends::DTO::ChampionStats
- Defined in:
- lib/league_of_legends/dto/champion_stats.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ChampionStats
constructor
A new instance of ChampionStats.
Constructor Details
#initialize(attributes) ⇒ ChampionStats
13 14 15 16 17 18 19 |
# File 'lib/league_of_legends/dto/champion_stats.rb', line 13 def initialize attributes return if attributes.nil? @id = attributes[:id].to_i @name = attributes[:name] @stats = ::LeagueOfLegends::DTO::AggregatedStats.new(attributes[:stats]) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/league_of_legends/dto/champion_stats.rb', line 11 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/league_of_legends/dto/champion_stats.rb', line 11 def name @name end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
11 12 13 |
# File 'lib/league_of_legends/dto/champion_stats.rb', line 11 def stats @stats end |
Class Method Details
.version ⇒ Object
7 8 9 |
# File 'lib/league_of_legends/dto/champion_stats.rb', line 7 def self.version ::LeagueOfLegends::DTO::RankedStats.version end |