Skip to content

Instantly share code, notes, and snippets.

@btaitelb
Created November 14, 2017 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btaitelb/f8421f79443c5df2badc489acc1c97ca to your computer and use it in GitHub Desktop.
Save btaitelb/f8421f79443c5df2badc489acc1c97ca to your computer and use it in GitHub Desktop.
require './animal'
class Panda < Animal
def initialize
super(2)
puts "Panda#initialize"
end
def speak
super
puts "nom, nom, nom!"
end
def name
"#{@name} nom nom"
end
attr_writer :bamboo_limit
# def bamboo_limit=(limit)
# @bamboo_limit = limit
# end
def healthy?
name = @name
if self.name == 'Po nom nom'
(3..6).include?(@bamboo_limit)
else
(2..4).include?(@bamboo_limit)
end
end
end
@JasonMcMahan
Copy link

we miss the horse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment