class Hedgehog
def initialize(name, age, allergies)
@name = name
@age = age
@allergies = allergies
end
def invite_to_party
"#{@name} is invited to the party!"
end
def self.confirm_attendee
"Another hedgie is coming to the party!"
end
def check_for_allergies
"Make sure to not serve any #{@allergies}."
end
end
Complete the following chart, assuming we have run...
hedgie_1 = Hedgehog.new("Sonic", 4, "ketchup")
Code to Run | ~~~~~ Your Prediction of Output ~~~~~ | OR - Check here if no clue |
---|---|---|
p hedgie_1 |
||
p hedgie_1.invite_to_party |
||
p hedgie_1.confirm_attendee |
||
p hedgie_1.check_for_allergies |
||
p Hedgehog.invite_to_party |
||
p Hedgehog.confirm_attendee |
||
p Hedgehog.check_for_allergies |