Skip to content

Instantly share code, notes, and snippets.

@charly
Created August 19, 2009 17:03
Show Gist options
  • Save charly/170461 to your computer and use it in GitHub Desktop.
Save charly/170461 to your computer and use it in GitHub Desktop.
module Creme
def cost
super + 0.4
end
end
class Coffee
def cost
3
end
end
x = Coffee.new
x.extend Creme
x.cost # => 3.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment