class

RubyCall::RWrap

Inherits Reference < Object

Constants

OPERATOR_NAMES = { "+": "+", "-": "-", "*": "*", "/": "/", "%": "%", "**": "**", "<<": "<<", ">>": ">>", "&": "&", "|": "|", "^": "^", }

Constructors

new(v : LibRuby::Value)

Только на воркере: v укореняется в зарегистрированном слоте.

Source

Class methods

kwargs_hash(kwargs) : Hash(String, RbArg) | Nil
Source
to_arg(v) : RbArg

NamedTuple kwargs → Hash(String, RbArg). Литералы приходят как Int32/Float32 — нормализуем в Int64/Float64.

Source

Instance methods

!=(other) : Bool

Returns true if this object is not equal to other.

By default this method is implemented as !(self == other) so there's no need to override this unless there's a more efficient way to do it.

Source
%(other) : RbValue
Source
&(other) : RbValue
Source
*(other) : RbValue
Source
**(other) : RbValue
Source
+(other) : RbValue
Source
-(other) : RbValue
Source
/(other) : RbValue
Source
<(other) : Bool
Source
<<(other) : RbValue
Source
<=(other) : Bool
Source
==(other) : Bool

Returns false (other can only be a Value here).

Source
>(other) : Bool
Source
>=(other) : Bool
Source
>>(other) : RbValue
Source
[](*keys) : RbValue
Source
[]=(*keys, value) : RbValue
Source
^(other) : RbValue
Source
__funcall(name : String, *args, **kwargs) : RbValue

Ruby-семантика: метод с 0 аргументов == голый атрибут → просто funcall.

Source
__funcall_bool(name : String, other) : Bool
Source
|(other) : RbValue
Source
finalize
Source
inspect(io : IO) : Nil

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Source
kind_of_ruby_class?(klass : self) : Bool
Source
respond_to?(name : String | Symbol) : Bool
Source
ruby_class_name
Source
same?(other : self) : Bool
Source
to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
value
Source
with_block(name : String, *args, **kwargs, &blk : Array(RbValue) -> RbValue) : RbValue

Вызов с блоком Crystal (Proc), прокинутым как ruby-блок.

Source

Macros

method_missing(call)
Source