class RegattaResults::Boat
Attributes
name[RW]
sail_number[RW]
series_finishes[RW]
series_points[RW]
series_standing[RW]
skipper[RW]
Public Class Methods
all()
click to toggle source
# File lib/regatta_results/boat.rb, line 18 def self.all @@all end
create_from_collection(boat_array)
click to toggle source
# File lib/regatta_results/boat.rb, line 12 def self.create_from_collection(boat_array) boat_array.each do |boat| self.new(boat) end end
empty()
click to toggle source
# File lib/regatta_results/boat.rb, line 22 def self.empty if @@all.length != 0 @@all.clear end end
new(boat_hash)
click to toggle source
# File lib/regatta_results/boat.rb, line 7 def initialize(boat_hash) boat_hash.each {|attribute, value| self.send("#{attribute}=", value)} @@all << self end