module Crystalizer::Any
Direct including types
Defined in:
any.crInstance Method Summary
-
#==(other : Any) : Bool
Returns
trueif bothselfand other's raw object are equal. -
#[](index : Int)
Assumes the underlying value is an
Indexableor aHash, and returns the element at the given index. -
#[](key)
Assumes the underlying value is a
Hashand returns the element with the given key. -
#[]?(index : Int)
Assumes the underlying value is an
Indexableand returns the element at the given index, ornilif out of bounds. -
#[]?(key)
Assumes the underlying value is a
Hashand returns the element with the given key, ornilif the key is not present. - #clone : Any
-
#dig(key_or_index, *subkeys)
Traverses the depth of a structure and returns the value, otherwise raises.
-
#dig?(key, *subkeys)
Traverses the depth of a structure and returns the value.
- #dup : Any
-
#hash(hasher)
See
Object#hash(hasher) -
#raw
Returns the raw underlying value.
- #size : Int
-
#to(type : T.class) : T forall T
Casts the underlying value to
T. -
#to?(type : T.class) forall T
Casts the underlying value to
T, or return nil if not possible.
Instance Method Detail
Returns true if both self and other's raw object are equal.
Assumes the underlying value is an Indexable or a Hash, and returns the element
at the given index.
Raises if the underlying value is not an Indexable or a Hash.
Assumes the underlying value is a Hash and returns the element
with the given key.
Raises if the underlying value is not a Hash.
Assumes the underlying value is an Indexable and returns the element
at the given index, or nil if out of bounds.
Raises if the underlying value is not an Indexable.
Assumes the underlying value is a Hash and returns the element
with the given key, or nil if the key is not present.
Raises if the underlying value is not a Hash.
Traverses the depth of a structure and returns the value, otherwise raises.
Traverses the depth of a structure and returns the value.
Returns nil if not found.
Casts the underlying value to T, or return nil if not possible.