Method: DataMapper::Hook::ClassMethods#registered_as_hook?

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

#registered_as_hook?(target_method, scope) ⇒ Boolean

Is the method registered as a hookable in the given scope.

Returns:

  • (Boolean)


189
190
191
# File 'lib/dm-core/support/hook.rb', line 189

def registered_as_hook?(target_method, scope)
  ! hooks_with_scope(scope)[target_method].nil?
end