class Therapy::OptionalType(T)

Defined in:

therapy/optional_type.cr

Constructors

Instance Method Summary

Instance methods inherited from class Therapy::BaseType(T?)

coercing : self coercing, create_subcontext(parent : ParseContext, input : V, path) : ParseContext(T?, V) forall V create_subcontext, optional : OptionalType(T?) optional, parse(input : V) : Result(T?) forall V parse, parse!(input) : T? parse!

Constructor Detail

def self.new(inner : BaseType(T)) #

[View source]

Instance Method Detail

def _coerce(value) : Result(T | Nil) #

[View source]
def optional : OptionalType(T) #

[View source]
def parse(input) : Result(T | Nil) #

[View source]