Module: Mustang::V8

Defined in:
lib/mustang/v8/date.rb,
lib/mustang/v8/array.rb,
lib/mustang/v8/error.rb,
lib/mustang/v8/number.rb,
lib/mustang/v8/object.rb,
lib/mustang/v8/regexp.rb,
lib/mustang/v8/string.rb,
lib/mustang/v8/boolean.rb,
lib/mustang/v8/context.rb,
lib/mustang/v8/integer.rb,
lib/mustang/v8/external.rb,
lib/mustang/v8/function.rb,
ext/v8/v8_main.cpp

Defined Under Namespace

Modules: Cast Classes: Array, Boolean, Context, Data, Date, EmptyClass, Error, External, FalseClass, Function, Integer, NullClass, Number, Object, Primitive, RangeError, ReferenceError, Regexp, String, SyntaxError, TrueClass, TypeError, UndefinedClass, Value

Constant Summary collapse

False =
rb_funcall2(rb_cV8FalseClass, rb_intern("new"), 1, &args)
True =
rb_funcall2(rb_cV8TrueClass, rb_intern("new"), 1, &args)
Empty =
rb_funcall2(rb_cV8EmptyClass, rb_intern("new"), 0, NULL)
Undefined =
rb_funcall2(rb_cV8UndefinedClass, rb_intern("new"), 0, NULL)
Null =
rb_funcall2(rb_cV8NullClass, rb_intern("new"), 0, NULL)

Class Method Summary collapse

Class Method Details

.alive?Boolean

Returns true wile V8 engine is running.

Returns:



28
29
30
31
# File 'ext/v8/v8_main.cpp', line 28

static VALUE rb_v8_alive_p(VALUE self)
{
  return V8::IsDead() ? Qfalse : Qtrue;
}

.dead?Boolean

Returns true when V8 engine is down.

Returns:



16
17
18
19
# File 'ext/v8/v8_main.cpp', line 16

static VALUE rb_v8_dead_p(VALUE self)
{
  return V8::IsDead() ? Qtrue : Qfalse;
}

.dead?Object

Returns used version of V8 engine.



40
41
42
43
# File 'ext/v8/v8_main.cpp', line 40

static VALUE rb_v8_version(VALUE self)
{
  return rb_str_new2(V8::GetVersion());
}