Skip to content

Instantly share code, notes, and snippets.

@achilles42
Created August 25, 2015 05:28
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 achilles42/05b562b496e67b7b588d to your computer and use it in GitHub Desktop.
Save achilles42/05b562b496e67b7b588d to your computer and use it in GitHub Desktop.
class Food
def type
raise NotImplementedError, 'Ask the subclass'
end
end
class Sandwich < Food
def type
'sandwich'
end
end
class Burger < Food
def type
'burgers'
end
end
class VeggiePatty < Food
def type
'veggie patties'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment