class Morpher::Transform::Exception

Generic exception transform

Public Instance Methods

call(input) click to toggle source

Apply transformation to input

@param [Object]

@return [Either<Error, Object>]

# File lib/morpher/transform.rb, line 487
def call(input)
  Either
    .wrap_error(error_class) { block.call(input) }
    .lmap { |exception| error(input: input, message: exception.to_s) }
end