Class: Mustang::GlobalContext
- Inherits:
-
Context
- Object
- V8::Context
- Context
- Mustang::GlobalContext
- Defined in:
- lib/mustang/context.rb
Overview
This kind of context is used by Mustang
module.
Instance Attribute Summary
Attributes inherited from V8::Context
Instance Method Summary collapse
- #exit ⇒ Object
- #global? ⇒ Boolean
-
#initialize ⇒ GlobalContext
constructor
A new instance of GlobalContext.
Methods inherited from Context
Methods inherited from V8::Context
#enter, #entered?, #eval, #evaluate, #get, #global, new, #prototype, #set
Constructor Details
#initialize ⇒ GlobalContext
Returns a new instance of GlobalContext.
55 56 57 58 |
# File 'lib/mustang/context.rb', line 55 def initialize(*) super enter end |
Instance Method Details
#exit ⇒ Object
60 61 62 63 |
# File 'lib/mustang/context.rb', line 60 def exit # We have to disable exit, because global context is immortal. raise ImmortalContextError, "Global context can't be exited" end |
#global? ⇒ Boolean
65 66 67 |
# File 'lib/mustang/context.rb', line 65 def global? true end |