lib/trailblazer/operation/rescue.rb in trailblazer-2.0.3 vs lib/trailblazer/operation/rescue.rb in trailblazer-2.0.4

- old
+ new

@@ -1,7 +1,7 @@ class Trailblazer::Operation - def self.Rescue(*exceptions, handler: Rescue::Noop, &block) + def self.Rescue(*exceptions, handler: lambda { |*| }, &block) exceptions = [StandardError] unless exceptions.any? handler = Option.(handler) rescue_block = ->(options, operation, *, &nested_pipe) { begin @@ -14,12 +14,8 @@ } step, _ = Wrap(rescue_block, &block) [ step, name: "Rescue:#{block.source_location.last}" ] - end - - module Rescue - Noop = ->(*) {} end end