- Add argument support for
ResultMonadcallbacks (before_error), allowing callbacks to receive the result data or errors as arguments.
- Prevent duplicate invocation of the error callback when guarding an instance method.
- Prevent mutable default options from being shared across instances.
ResultMonadcallbacks (before_success,before_error) are now inherited.
- Listen on multiple event names to
EventSourcelistener.
- Have
GuardFailedinherit fromExceptioninstead ofStandardError.
- Loosen the ActiveSupport dependency version to prepare for Rails 7.
- Yield the result of the call from
FunctionalObjectif block is given.
- Add
ResultMonad::GuardClause#passmethod which can be used to pass guards.
- Add guard clauses through new
ResultMonad::GuardClausemixin.
- Allow transform declaration with optional value to
OptionsDeclaration.
- Add support for transformation methods to
OptionsDeclaration.
- Add back dependency on
ActiveSupport#class_attributewhich was dropped prematurely.
- Add
error_handlerconfiguration option to theEventSourcemodule.
- Add nicely formatted inspect output for
ResultMonad::Result.
- Split child classes of
EventSourceandOptionsDeclarationinto own files. - Add a bunch more inline documentation for the mixins.
- Remove
EventSourceandResultMonaddependencies on ActiveSupport.
- Allow
default: nilto be used without needingrequired: falsefor theOptionsDeclaration.optionmethod.
- Add
raise_errorsoption toEventSource.onmethod.
- Require
EventSourceby default.
- Add
EventSourcemixin.
- Add
before_successandbefore_errorcallbacks toResultMonad.
- Add
ResultMonadmixin.
- Add
OptionsDeclarationmixin.
- Require
FunctionalObjectby default.
- Add
FunctionalObjectmixin.