Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
therapy
main
Therapy
ArrayType
BaseType
BoolType
Check
EnumType
Error
FloatType
IntType
ObjectType
OptionalType
ParseContext
PathType
Result
Failure
Success
StringType
SubContext
TupleType
Generated using Crystal 1.16.3
2026-01-28 23:09:56 UTC
class
Therapy::
OptionalType(T)
Therapy::OptionalType(T)
Therapy::BaseType(T?)
Reference
Object
Defined in:
therapy/optional_type.cr
Constructors
.new
(inner : BaseType(T))
Instance Method Summary
#optional
: OptionalType(T)
#parse
(input : Nil) : Result(T | Nil)
Instance methods inherited from class
Therapy::BaseType(T?)
create_subcontext(parent : ParseContext, input : V, path : PathType) : 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
optional
:
OptionalType
(T)
#
[
View source
]
def
parse
(input : Nil) :
Result
(T | Nil)
#
[
View source
]