struct Totem::Any
- Totem::Any
- Struct
- Value
- Object
Overview
Totem::Any
is a convenient wrapper around all possible types(Totem::Any::Type
) and
can be used for traversing dynamic or unkown types.
Defined in:
totem/any.crConstructors
Instance Method Summary
-
#==(other : Totem::Any)
Returns
true
if bothself
and other's raw object are equal. -
#==(other)
Returns
true
if the raw object is equal to other. - #[](key : Int) : Any
- #[](key : String) : Any
- #[]=(key : String, value : _)
- #[]?(key : Int) : Any | Nil
- #[]?(key : String) : Any | Nil
- #as_a : Array(Any)
- #as_a? : Array(Any) | Nil
- #as_bool
- #as_bool?
- #as_f
- #as_f32
- #as_f32?
- #as_f?
- #as_h : Hash(String, Any)
- #as_h? : Hash(String, Any) | Nil
- #as_i
- #as_i64
- #as_i64?
- #as_i?
- #as_nil : Nil
- #as_s
- #as_s?
- #as_time(timezone : Time::Location | Nil = nil)
- #as_time?(timezone : Time::Location | Nil = nil)
- #clone
-
#dup
Returns a shallow copy of this object.
-
#hash(hasher)
See
Object#hash(hasher)
- #raw : Type
- #size : Int
Instance methods inherited from struct Value
==(other : Totem::Any)
==
Instance methods inherited from class Object
===(other : Totem::Any)
===
Constructor Detail
Instance Method Detail
def dup
#
Description copied from struct Value
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.