Method: DataMapper::Hook::ClassMethods#process_method_added

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

#process_method_added(method_name, scope) ⇒ Object

This will need to be refactored



210
211
212
213
214
215
216
217
218
219
220
# File 'lib/dm-core/support/hook.rb', line 210

def process_method_added(method_name, scope)
  hooks_with_scope(scope).each do |target_method, hooks|
    if hooks[:before].any? { |hook| hook[:name] == method_name }
      define_hook_stack_execution_methods(target_method, scope)
    end

    if hooks[:after].any? { |hook| hook[:name] == method_name }
      define_hook_stack_execution_methods(target_method, scope)
    end
  end
end