Module: Mustang

Extended by:
Delegated
Defined in:
lib/mustang.rb,
lib/mustang/errors.rb,
lib/mustang/context.rb

Defined Under Namespace

Classes: Context, Errors, GlobalContext, ImmortalContextError, 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



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

def self.delegate
  global
end

.globalObject

Global context.



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

def self.global
  @global or reset!
end

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

Resets global context state. Appartently just creates new global context and enters it.



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

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