class Reacto::Operations::RescueAndReplaceError
Public Class Methods
new(action)
click to toggle source
# File lib/reacto/operations/rescue_and_replace_error.rb, line 6 def initialize(action) @action = action end
Public Instance Methods
call(tracker)
click to toggle source
# File lib/reacto/operations/rescue_and_replace_error.rb, line 10 def call(tracker) error = -> (e) do trackable = @action.call(e) trackable.send(:do_track, tracker) end Subscriptions::OperationSubscription.new(tracker, error: error) end