Method: DataMapper::Hook::ClassMethods#register_instance_hooks

Defined in:
lib/dm-core/support/hook.rb

#register_instance_hooks(*hooks) ⇒ Object

Register aninstance method as hookable. Registering a method means that before hooks will be run immediately before the method is invoked and after hooks will be called immediately after the method is invoked.

-

Parameters:

  • hookable_method (Symbol)

    The name of the instance method that should be hookable



127
128
129
# File 'lib/dm-core/support/hook.rb', line 127

def register_instance_hooks(*hooks)
  hooks.each { |hook| register_hook(hook, :instance) }
end