Method: Onceler::Configuration#run_hooks

Defined in:
lib/onceler/configuration.rb

#run_hooks(timing, scope, context) ⇒ Object



26
27
28
29
30
# File 'lib/onceler/configuration.rb', line 26

def run_hooks(timing, scope, context)
  hooks[timing][scope].each do |hook|
    context ? context.instance_eval(&hook) : hook.call
  end
end