Skip to content

Instantly share code, notes, and snippets.

Created October 11, 2012 19:17
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 anonymous/3874828 to your computer and use it in GitHub Desktop.
Save anonymous/3874828 to your computer and use it in GitHub Desktop.
class JellyBean < Dessert
#attr_accessor method is use here due to inheritance and modified for flavor
attr_accessor :flavor
def initialize(name, calories, flavor)
@name
@calories
@flavor
end
def delicious?
if @flavor = "black licorice"
return false
else
return true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment