Method: Docman::Command#run_with_hooks
- Defined in:
- lib/docman/commands/command.rb
#run_with_hooks(method) ⇒ Object
86 87 88 89 90 91 92 93 94 95 |
# File 'lib/docman/commands/command.rb', line 86 def run_with_hooks(method) with_logging(method) do run_actions("before_#{method}") run_hook "before_#{method}".to_sym result = self.send(method) @execute_result = result if method == 'execute' run_hook "after_#{method}".to_sym run_actions("after_#{method}") end end |