struct

Crysda::AnyVal

Inherits Struct / Value / Object

Wrapper around Any and provide convenient methods like as_xxx to access the value in specific format.

Constructors

Class methods

[](val : Any | DataFrame)
Source

Instance methods

==(other : self)
as_bool

Checks that the underlying value is Bool, and returns its value. Raises otherwise.

Source
as_bool?

Checks that the underlying value is Bool, and returns its value. Returns nil otherwise.

Source
as_df

Checks that the underlying value is DataFrame, and returns its value. Raises otherwise.

Source
as_df?

Checks that the underlying value is DataFrame, and returns its value. Returns nil otherwise.

Source
as_f

Checks that the underlying value is Float, and returns its value as an Float64. Raises otherwise.

Source
as_f32

Checks that the underlying value is Float, and returns its value as an Float32. Raises otherwise.

Source
as_f32?

Checks that the underlying value is Float, and returns its value as an Float32. Returns nil otherwise.

Source
as_f?

Checks that the underlying value is Float, and returns its value as an Float64. Returns nil otherwise.

Source
as_i

Checks that the underlying value is Int, and returns its value as an Int32. Raises otherwise.

Source
as_i64

Checks that the underlying value is Int, and returns its value as an Int64. Raises otherwise.

Source
as_i64?

Checks that the underlying value is Int, and returns its value as an Int64. Returns nil otherwise.

Source
as_i?

Checks that the underlying value is Int, and returns its value as an Int32. Returns nil otherwise.

Source
as_nil

Checks that the underlying value is Nil, and returns nil. Raises otherwise.

Source
as_s

Checks that the underlying value is String, and returns its value. Raises otherwise.

Source
as_s?

Checks that the underlying value is String, and returns its value. Returns nil otherwise.

Source
as_t

Checks that the underlying value is Time, and returns its value. Raises otherwise.

Source
as_t?

Checks that the underlying value is Time, and returns its value. Returns nil otherwise.

Source
hash(hasher)

See Object#hash(hasher)

to_s(io : IO) : Nil

Same as #inspect(io).

Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source

Macros

method_missing(call)
Source