Method: Player#initialize
- Defined in:
- lib/redbull_team/player.rb
#initialize(hash) ⇒ Player
Returns a new instance of Player.
4 5 6 7 |
# File 'lib/redbull_team/player.rb', line 4 def initialize(hash) hash.each{|key, value| self.send("#{key}=", value)} self.class.all << self end |