class Pastry

Attributes

description[RW]
name[RW]

Public Class Methods

all() click to toggle source
# File lib/coffee_drinks/pastry.rb, line 14
def self.all
    @@all
end
new(name, description = nil) click to toggle source
# File lib/coffee_drinks/pastry.rb, line 8
def initialize (name, description = nil)
    @name = name
    @description = description
    @@all << self
end
sorted_all() click to toggle source
# File lib/coffee_drinks/pastry.rb, line 18
def self.sorted_all
    self.all.sort_by {|pastry| pastry.name}.each {|instance| @@all_sorted << instance }
    @@all_sorted
end