This page printed from:
panoptic.com/rking/Hook+Methods+of+Ruby
For Our King, Only
Recent Changes
/
Heat
/
Syntax
/
History
Hook Methods of Ruby
!! Module#included Signature: included(arg1) Callback invoked whenever the receiver is included in another module or class. This should be used in preference to Module.append_features</tt> if your code wants to perform some action when a module is included in another. {{ module A def A.included(mod) puts "#{self} included in #{mod}" end end module Enumerable include A end }} Another example: http://blog.reenhanced.com/post/31397796389/log-all-calls-to-instance-methods-of-a-ruby-class
Password
Summary of changes
Erase cookies
/
Syntax
/
History
Last changed: 2012/12/06 10:59