Method: Docman::Command#run_actions
- Defined in:
- lib/docman/commands/command.rb
#run_actions(name) ⇒ Object
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/docman/commands/command.rb', line 78 def run_actions(name) if @hooks.has_key?(name) and not @hooks[name].nil? @hooks[name].sort_by!{|a| a['order']} @hooks[name].each do |hook| next if hook.has_key?('run_on_success_only') and hook['run_on_success_only'] and not @execute_result context = hook.has_key?('context') ? hook['context'] : @context Docman::Command.create(hook, context, self).perform end end end |