TODO: Write more documentation!
Overview
allows the developer to specify a method or block that should run before or after another method.
Usage
Inheritance
Other Goodies
Please bring up any issues regarding Hooks with carllerche on IRC
# File lib/extlib/hook.rb, line 30 30: def self.included(base) 31: base.extend(ClassMethods) 32: base.const_set("CLASS_HOOKS", {}) unless base.const_defined?("CLASS_HOOKS") 33: base.const_set("INSTANCE_HOOKS", {}) unless base.const_defined?("INSTANCE_HOOKS") 34: base.class_eval do 35: class << self 36: def method_added(name) 37: process_method_added(name, :instance) 38: super 39: end 40: 41: def singleton_method_added(name) 42: process_method_added(name, :class) 43: super 44: end 45: end 46: end 47: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.