class Champion

Attributes

build[RW]
cs[RW]
my_winpercent[RW]
name[RW]

Public Class Methods

create_from_collection(champions_array) click to toggle source
# File lib/LeagueHelper/champions.rb, line 10
def self.create_from_collection(champions_array)
  champions_array.each { |character| champion = champion.new(character) }
end
new(attributes_hash) click to toggle source
# File lib/LeagueHelper/champions.rb, line 5
def initialize(attributes_hash)
  attributes_hash.each { |k, v| self.send(("#{k}="), v) }
  @build = []
end

Public Instance Methods

player=(summoner) click to toggle source
# File lib/LeagueHelper/champions.rb, line 14
def player=(summoner)
  summoner.champions << self
end