Class: Suture::Util::Scalpel
- Inherits:
-
Object
- Object
- Suture::Util::Scalpel
- Includes:
- Adapter::Log
- Defined in:
- lib/suture/util/scalpel.rb
Instance Method Summary collapse
Methods included from Adapter::Log
#log_debug, #log_error, #log_info, #log_warn, logger, reset!
Instance Method Details
#cut(plan, location, args_override = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/suture/util/scalpel.rb', line 7 def cut(plan, location, args_override = nil) args = args_for(plan, args_override) begin plan.send(location).call(*args).tap do |result| call_after_hook(plan, location, args, result) end rescue StandardError => error log_error_details(plan, location, args, error) call_error_hook(plan, location, args, error) raise error end end |