Skip to content

Instantly share code, notes, and snippets.

@knoxknox
Created March 24, 2015 22: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 knoxknox/159257313a157fa90363 to your computer and use it in GitHub Desktop.
Save knoxknox/159257313a157fa90363 to your computer and use it in GitHub Desktop.
##
# Hooks:
# extended (Class that called with extend)
# included (Class that called with include)
# prepended (Class that called with prepend)
# inherited (Class that was inherited with <)
# method_added (Method symbol of new method created)
# method_removed (Method symbol when method removed)
# method_undefined (Method symbol of undefined method)
# singleton_method_added (Method symbol of new method created)
# singleton_method_removed (Method symbol when method removed)
# singleton_method_undefined (Method symbol of undefined method)
#
module Example
def self.included(base)
# do something on include
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment