Skip to content

Instantly share code, notes, and snippets.

@dunkrupp
Created September 2, 2024 14:50
Show Gist options
  • Save dunkrupp/b2f229417a19ea639958b4b341f51824 to your computer and use it in GitHub Desktop.
Save dunkrupp/b2f229417a19ea639958b4b341f51824 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
class BaseOperation
include Callee
include Dry::Monads[:do, :result]
private
def capture_and_fail(message, exception)
Rails.logger.error(exception.message)
Failure(message)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment