Class: SystemHooksService

Inherits:
Object
  • Object
show all
Defined in:
app/services/system_hooks_service.rb

Instance Method Summary collapse

Instance Method Details

#execute_hooks(data, hooks_scope = :all) ⇒ Object


6
7
8
9
10
# File 'app/services/system_hooks_service.rb', line 6

def execute_hooks(data, hooks_scope = :all)
  SystemHook.send(hooks_scope).each do |hook|
    hook.async_execute(data, 'system_hooks')
  end
end

#execute_hooks_for(model, event) ⇒ Object


2
3
4
# File 'app/services/system_hooks_service.rb', line 2

def execute_hooks_for(model, event)
  execute_hooks(build_event_data(model, event))
end