Class: ChampionStats
- Inherits:
-
Object
- Object
- ChampionStats
- Defined in:
- lib/sightstone/ranked_stats.rb
Instance Attribute Summary (collapse)
-
- (Object) id
Returns the value of attribute id.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) stats
Returns the value of attribute stats.
Instance Method Summary (collapse)
-
- (ChampionStats) initialize(data)
constructor
A new instance of ChampionStats.
Constructor Details
- (ChampionStats) initialize(data)
Returns a new instance of ChampionStats
21 22 23 24 25 26 27 28 29 |
# File 'lib/sightstone/ranked_stats.rb', line 21 def initialize(data) @id = data['id'] @name = data['name'] @stats = [] data['stats'].each do |stat| @stats << ChampionStat.new(stat) end end |
Instance Attribute Details
- (Object) id
Returns the value of attribute id
19 20 21 |
# File 'lib/sightstone/ranked_stats.rb', line 19 def id @id end |
- (Object) name
Returns the value of attribute name
19 20 21 |
# File 'lib/sightstone/ranked_stats.rb', line 19 def name @name end |
- (Object) stats
Returns the value of attribute stats
19 20 21 |
# File 'lib/sightstone/ranked_stats.rb', line 19 def stats @stats end |