struct MaxMindDB::Any
Defined in:
maxminddb/any.crConstructors
Instance Method Summary
- #[](index_or_key : Int | String | Symbol) : Any
- #[]?(index_or_key : Int | String | Symbol) : Any | Nil
- #as_a : Array(Any)
- #as_a? : Array(Any) | Nil
- #as_bool : Bool
- #as_bool? : Bool | Nil
- #as_f : Float64
- #as_f32 : Float32
- #as_f32? : Float32 | Nil
- #as_f? : Float64 | Nil
- #as_h : Hash(String, Any)
- #as_h? : Hash(String, Any) | Nil
- #as_i : Int32
- #as_i? : Int32 | Nil
- #as_nil : Nil
- #as_s : String
- #as_s? : String | Nil
- #as_u : UInt32
- #as_u128 : UInt128
- #as_u128? : UInt128 | Nil
- #as_u16 : UInt16
- #as_u16? : UInt16 | Nil
- #as_u64 : UInt64
- #as_u64? : UInt64 | Nil
- #as_u? : UInt32 | Nil
- #empty?
- #found?
-
#hash(hasher)
See
Object#hash(hasher)
- #inspect(io)
- #raw : Type
- #size : Int
- #to_json(json : ::JSON::Builder)
Instance methods inherited from struct Value
==(other : MaxMindDB::Any)
==
Instance methods inherited from class Object
===(other : MaxMindDB::Any)
===
Constructor Detail
Instance Method Detail
Assumes the underlying value is an Array
or Hash
and returns the element at the given index_or_key.
Raises if the underlying value is not an Array
nor a Hash
.
Assumes the underlying value is an Array
or Hash
and returns the element
at the given index_or_key, or nil
if out of bounds or the key is missing.
Raises if the underlying value is not an Array
nor a Hash
.