Skip to content

Instantly share code, notes, and snippets.

@raul
Created July 29, 2010 08:28
Show Gist options
  • Select an option

  • Save raul/497616 to your computer and use it in GitHub Desktop.

Select an option

Save raul/497616 to your computer and use it in GitHub Desktop.
module Mod
def self.included(base)
base.class_eval do
puts "Included in #{base}"
end
end
end
class Foo
include Mod
end
class Bar
include Mod
end
# Output:
# Included in Foo
# Included in Bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment