struct

Kebab::Error::InvalidValue

Inherits Kebab::Error::Base < Struct < Value < Object

A value couldn't be converted to its target type. Dispatchable on value type via Of(T), on command via For(C), or on both via Exact(T, C).

Constructors

new(value : String, source : Schema::Option | Schema::Argument, schema : Schema::Command, target_name : String | Nil = nil, reason : String | Nil = nil, invoked : String | Nil = nil)
Source

Instance methods

reason

Optional explanation provided by the converter (rendered in parens).

Source
schema

The command being parsed when the error fired.

Source
source

The option or argument the value was being parsed for.

Source
target_name

Human-readable noun for the target type, supplied by the converter (e.g. "whole number"). Nil falls back to the type's class name.

Source
target_type

The target type's class.

Source
target_type_name

The target type's class name.

Source
value

The raw input that couldn't be converted.

Source

Nested types