module Anyolite::RbCast

Overview

Module for specific casts of Crystal values into mruby values

Defined in:

RbCast.cr

Class Method Summary

Macro Summary

Class Method Detail

def self.cast_to_bool(rb : Pointer(RbCore::State), value : RbCore::RbValue) #

[View source]
def self.cast_to_char(rb : Pointer(RbCore::State), value : RbCore::RbValue) #

[View source]
def self.cast_to_float(rb : Pointer(RbCore::State), value : RbCore::RbValue) #

[View source]
def self.cast_to_int(rb : Pointer(RbCore::State), value : RbCore::RbValue) #

[View source]
def self.cast_to_nil(rb : Pointer(RbCore::State), value : RbCore::RbValue) #

[View source]
def self.cast_to_string(rb : Pointer(RbCore::State), value : RbCore::RbValue) #

TODO Maybe add an option for implicit casts?


[View source]
def self.casting_error(rb : Pointer(RbCore::State), value, crystal_class, rescue_value) #

[View source]
def self.check_for_array(value : RbCore::RbValue) #

[View source]
def self.check_for_bool(value : RbCore::RbValue) #

[View source]
def self.check_for_data(value : RbCore::RbValue) #

[View source]
def self.check_for_false(value : RbCore::RbValue) #

[View source]
def self.check_for_fixnum(value : RbCore::RbValue) #

[View source]
def self.check_for_float(value : RbCore::RbValue) #

[View source]
def self.check_for_hash(value : RbCore::RbValue) #

[View source]
def self.check_for_nil(value : RbCore::RbValue) #

[View source]
def self.check_for_string(value : RbCore::RbValue) #

[View source]
def self.check_for_symbol(value : RbCore::RbValue) #

[View source]
def self.check_for_true(value : RbCore::RbValue) #

[View source]
def self.check_for_undef(value : RbCore::RbValue) #

[View source]
def self.convert_to_unsafe_rb_value(rb : Pointer(RbCore::State), value) #

[View source]
def self.is_undef?(value) #

[View source]
def self.return_array(rb : Pointer(RbCore::State), value) #

[View source]
def self.return_bool(value) #

[View source]
def self.return_false #

[View source]
def self.return_fixnum(value) #

[View source]
def self.return_float(rb : Pointer(RbCore::State), value) #

[View source]
def self.return_hash(rb : Pointer(RbCore::State), value) #

[View source]
def self.return_nil #

[View source]
def self.return_object(rb : Pointer(RbCore::State), value : Object) #

[View source]
def self.return_regex(rb : Pointer(RbCore::State), value) #

[View source]
def self.return_string(rb : Pointer(RbCore::State), value) #

[View source]
def self.return_struct_or_enum(rb : Pointer(RbCore::State), value : Struct | Enum) #

[View source]
def self.return_symbol(rb : Pointer(RbCore::State), value) #

[View source]
def self.return_true #

[View source]
def self.return_value(rb : Pointer(RbCore::State), value : Object) #

[View source]

Macro Detail

macro check_custom_type(rb, value, crystal_type) #

[View source]