struct Null
Defined in:
nason/null.crConstructors
Instance Method Summary
-
#==(other : Null)
Returns
0_u64
. - #clone
-
#inspect(io : IO) : Nil
Writes
"null"
to the givenIO
. -
#inspect : String
Returns
"nil"
. -
#not_nil! : Null
Raises
NullAssertionError
. - #not_null! : NoReturn
-
#presence : Nil
Returns
self
. -
#same?(other : Null)
Returns
true
:Null
has only one singleton value:nil
. -
#same?(other : Reference) : Bool
Returns
false
. - #to_json_object_key : String
- #to_nason(nson : NASON::Builder) : Nil
-
#to_s(io : IO) : Nil
Appends
"null"
to the given IO. -
#to_s : String
Returns
"null"
- #to_yaml(yaml : YAML::Nodes::Builder) : Nil
-
#try(&)
Doesn't yield to the block.
Instance methods inherited from struct Value
==(other : NASON::Any)
==
Instance methods inherited from class Object
===(other : NASON::Any)
===,
nil_or_null?
nil_or_null?,
not_null!
not_null!,
null?
null?,
to_nason(io : IO) : Nilto_nason : String to_nason, to_pretty_json(indent : String = " ") : String
to_pretty_json(io : IO, indent : String = " ") : Nil to_pretty_json
Class methods inherited from class Object
from_nason(string_or_io, root : String)from_nason(string_or_io) from_nason
Constructor Detail
Instance Method Detail
Returns 0_u64
. Even though Null
is not a Reference
type, it is usually
mixed with them to form nilable types so it's useful to have an
object id for nil
.
Returns true
: Null
has only one singleton value: nil
.