Class: ChampionStats

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/ranked_stats.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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