Skip to content

Instantly share code, notes, and snippets.

@brianstorti
Created April 27, 2011 03: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 brianstorti/943648 to your computer and use it in GitHub Desktop.
Save brianstorti/943648 to your computer and use it in GitHub Desktop.
Basic mixin example
module Debug
def who_am_i?
self.class.name
end
end
class A
include Debug
end
class B
include Debug
end
A.new.who_am_i?
B.new.who_am_i?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment