Class: Mayak::ValidationResult::Invalid

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Generic, T::Sig
Includes:
Mayak::ValidationResult
Defined in:
lib/mayak/validation_result.rb

Constant Summary collapse

Error =
type_member

Instance Method Summary collapse

Methods included from Mayak::ValidationResult

from_exceptions, from_strings, #invalid?, #on_valid, #valid?

Instance Method Details

#map_errors(&blk) ⇒ Object



110
111
112
# File 'lib/mayak/validation_result.rb', line 110

def map_errors(&blk)
  ::Mayak::ValidationResult::Invalid[T.any(Error, T.type_parameter(:NewError))].new(errors: errors.map(&blk))
end