class SeaLife::Category
Attributes
animals[RW]
name[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/sea_life/category.rb, line 12 def self.all @@all end
find_by_name(name)
click to toggle source
# File lib/sea_life/category.rb, line 16 def self.find_by_name(name) self.all.detect { |c| c.name == name } end
new(hash)
click to toggle source
# File lib/sea_life/category.rb, line 6 def initialize(hash) hash.each { |k, v| self.send("#{k}=", v) } self.class.all << self @animals = [] end