Method: Silicon::Chain#execute
- Defined in:
- lib/silicon/chain.rb
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/silicon/chain.rb', line 12 def execute if @catch_command.nil? run_commands else begin run_commands rescue Exception => error @container .register_instance(error, :silicon_error) .using_lifetime(:scope) .bound_to(:silicon_request) action = @container.resolve(@catch_command.name.to_sym) action.call end end end |