Module: Mustang

Extended by:
Delegated
Defined in:
lib/mustang.rb,
lib/mustang/errors.rb,
lib/mustang/context.rb,
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: V8 Classes: Context, Errors, ScriptNotFoundError

Class Method Summary collapse

Methods included from Delegated

method_missing, old_method_missing, old_respond_to?, respond_to?, to_s

Class Method Details

.delegateObject



26
27
28
# File 'lib/mustang.rb', line 26

def self.delegate
  global
end

.globalObject



30
31
32
# File 'lib/mustang.rb', line 30

def self.global
  @global or reset!
end

.reset!(*args, &block) ⇒ Object

Resets global context state (just creates new global context and enters to it).



35
36
37
# File 'lib/mustang.rb', line 35

def self.reset!(*args, &block)
  @global = Context.new(*args, &block)
end