class Player
Attributes
age[RW]
height[RW]
name[RW]
position[RW]
weight[RW]
Public Class Methods
all()
click to toggle source
# File lib/redbull_team/player.rb, line 8 def self.all @@all end
count()
click to toggle source
# File lib/redbull_team/player.rb, line 14 def self.count self.all.length end
new(hash)
click to toggle source
# File lib/redbull_team/player.rb, line 4 def initialize(hash) hash.each{|key, value| self.send("#{key}=", value)} self.class.all << self end
reset()
click to toggle source
# File lib/redbull_team/player.rb, line 11 def self.reset self.all.clear end