module

Crystalizer::Any

Instance methods

==(other : Any) : Bool

Returns true if both self and other's raw object are equal.

Source
[](index : Int)

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.

Source
[](key)

Assumes the underlying value is a Hash and returns the element with the given key.

Raises if the underlying value is not a Hash.

Source
[]?(index : Int)

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.

Source
[]?(key)

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.

Source
clone

Returns a new Any instance with the raw value cloneed.

Source
dig(key_or_index, *subkeys)

Traverses the depth of a structure and returns the value, otherwise raises.

Source
dig?(key, *subkeys)

Traverses the depth of a structure and returns the value. Returns nil if not found.

Source
dup

Returns a new Any instance with the raw value duped.

Source
hash(hasher)

See Object#hash(hasher)

Source
raw

Returns the raw underlying value.

Source
size
Source
to(type : T.class) : T forall T

Casts the underlying value to T.

Source
to?(type : T.class) forall T

Casts the underlying value to T, or return nil if not possible.

Source

Nested types