class House

Attributes

colors[RW]
founder[RW]
ghost[RW]
head_of_house[RW]
mascot[RW]
name[RW]
values[RW]

Public Class Methods

all() click to toggle source
# File lib/hogwarts_cli/hogwarts_houses.rb, line 17
def self.all
    @@all
end
new(name, colors, mascot, values, head_of_house, ghost, founder) click to toggle source
# File lib/hogwarts_cli/hogwarts_houses.rb, line 6
def initialize(name, colors, mascot, values, head_of_house, ghost, founder)
    @name = name
    @colors = colors
    @mascot = mascot
    @values = values
    @head_of_house = head_of_house
    @ghost = ghost
    @founder = founder
    save
end

Public Instance Methods

save() click to toggle source
# File lib/hogwarts_cli/hogwarts_houses.rb, line 21
def save
    @@all << self
end