Sha256: 862811b41e035b5f3ca9ec44e27534306ea3ea48a391e08edf09ee31d5312c80
Contents?: true
Size: 577 Bytes
Versions: 25
Compression:
Stored size: 577 Bytes
Contents
# frozen_string_literal: true require "dry/monads/result" module Dry module Schema # Monad extension for Result # # @api public class Result include Dry::Monads::Result::Mixin # Turn result into a monad # # This makes result objects work with dry-monads (or anything with a compatible interface) # # @return [Dry::Monads::Success,Dry::Monads::Failure] # # @api public def to_monad if success? Success(self) else Failure(self) end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems