module
Amber::Schema::ResultHelpers
Overview
Helper module for working with Results
Defined in:
amber/schema/result.crClass Method Summary
-
.combine(results : Array(Success(T) | Failure(T))) forall T
Combine multiple results into a single result
-
.first_success(results : Array(Success(T) | Failure(T))) forall T
Try multiple validations and return the first success
-
.sequence(results : Hash(String, Success(T) | Failure(T))) forall T
Sequence a hash of results into a result of hash
Class Method Detail
Combine multiple results into a single result
Try multiple validations and return the first success
Sequence a hash of results into a result of hash