struct

Totem::Any

Inherits Struct < Value < Object

Totem::Any is a convenient wrapper around all possible types(Totem::Any::Type) and can be used for traversing dynamic or unkown types.

Constructors

new(raw : Array(_))
Source
new(raw : Hash(String, _))
Source
new(raw : Type)
Source
new(raw : Any)
Source

Instance methods

==(other : Totem::Any)

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

Source
==(other)

Returns true if the raw object is equal to other.

Source
[](key : Int) : Any
Source
[](key : String) : Any
Source
[]=(key : String, value : _)
Source
[]?(key : Int) : Any | Nil
Source
[]?(key : String) : Any | Nil
Source
as_a
Source
as_a?
Source
as_bool
Source
as_bool?
Source
as_f
Source
as_f32
Source
as_f32?
Source
as_f?
Source
as_h
Source
as_h?
Source
as_i
Source
as_i64
Source
as_i64?
Source
as_i?
Source
as_nil
Source
as_s
Source
as_s?
Source
as_time(timezone : Time::Location | Nil = nil)
Source
as_time?(timezone : Time::Location | Nil = nil)
Source
clone
Source
dup

Returns a shallow copy of this object.

Because Value is a value type, this method returns self, which already involves a shallow copy of this object because value types are passed by value.

Source
hash(hasher)

See Object#hash(hasher)

Source
size
Source

Nested types