Class: Mustang::V8::External
- Includes:
- Comparable, Delegated
- Defined in:
- lib/mustang/v8/external.rb,
ext/v8/v8_external.cpp
Class Method Summary collapse
-
.new(obj) ⇒ Object
Wraps given object as new v8 external.
-
.wrap(obj) ⇒ Object
Wraps given object as new v8 external.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #delegate ⇒ Object
-
#to_obj ⇒ Object
Returns original value of wraped external.
-
#value ⇒ Object
Returns original value of wraped external.
Methods included from Delegated
#method_missing, #old_method_missing, #old_respond_to?, #respond_to?, #to_s
Methods inherited from Value
#==, #===, #array?, #ary?, #bool?, #boolean?, #date?, #empty?, #external?, #false?, #func?, #function?, #int?, #integer?, #null?, #num?, #number?, #obj?, #object?, #regex?, #regexp?, #str?, #string?, #to_boolean, #to_integer, #to_number, #to_object, #to_string, #true?, #undefined?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Delegated
Class Method Details
.V8::External.new(obj) ⇒ Object .V8::External.wrap(obj) ⇒ Object
Wraps given object as new v8 external.
29 30 31 32 33 34 |
# File 'ext/v8/v8_external.cpp', line 29
static VALUE rb_v8_external_new(VALUE klass, VALUE obj)
{
HandleScope scope;
PREVENT_CREATION_WITHOUT_CONTEXT();
return v8_ref_new(klass, to_v8_external(obj));
}
|
.V8::External.new(obj) ⇒ Object .V8::External.wrap(obj) ⇒ Object
Wraps given object as new v8 external.
29 30 31 32 33 34 |
# File 'ext/v8/v8_external.cpp', line 29
static VALUE rb_v8_external_new(VALUE klass, VALUE obj)
{
HandleScope scope;
PREVENT_CREATION_WITHOUT_CONTEXT();
return v8_ref_new(klass, to_v8_external(obj));
}
|
Instance Method Details
#<=>(other) ⇒ Object
7 8 9 |
# File 'lib/mustang/v8/external.rb', line 7 def <=>(other) to_obj <=> other end |
#delegate ⇒ Object
11 12 13 |
# File 'lib/mustang/v8/external.rb', line 11 def delegate to_obj end |