Harbor::Hooks
Public Class Methods
included(target)
# File lib/harbor/hooks.rb, line 4 4: def self.included(target) 5: target.extend(ClassMethods) 6: 7: target.class_eval do 8: @__harbor_hooked_method_added = method(:method_added) if respond_to?(:method_added) 9: def self.method_added(method) 10: if !@__harbor_binding_method && hooks.has_key?(method) 11: chain = hooks[method] 12: chain.bind! 13: end 14: 15: @__harbor_hooked_method_added.call(method) if @__harbor_hooked_method_added 16: end 17: end 18: 19: end