Class: ExecJS::Runtime
- Inherits:
-
Object
show all
- Defined in:
- lib/execjs/runtime.rb
Overview
Abstract base class for runtimes
Defined Under Namespace
Classes: Context
Instance Method Summary
collapse
Instance Method Details
permalink
#available? ⇒ Boolean
[View source]
51
52
53
|
# File 'lib/execjs/runtime.rb', line 51
def available?
raise NotImplementedError
end
|
permalink
#compile(source) ⇒ Object
[View source]
43
44
45
|
# File 'lib/execjs/runtime.rb', line 43
def compile(source)
context_class.new(self, source)
end
|
permalink
#context_class ⇒ Object
[View source]
29
30
31
|
# File 'lib/execjs/runtime.rb', line 29
def context_class
self.class::Context
end
|
permalink
#deprecated? ⇒ Boolean
[View source]
47
48
49
|
# File 'lib/execjs/runtime.rb', line 47
def deprecated?
false
end
|
permalink
#eval(source) ⇒ Object
[View source]
38
39
40
41
|
# File 'lib/execjs/runtime.rb', line 38
def eval(source)
context = context_class.new(self)
context.eval(source)
end
|
permalink
#exec(source) ⇒ Object
[View source]
33
34
35
36
|
# File 'lib/execjs/runtime.rb', line 33
def exec(source)
context = context_class.new(self)
context.exec(source)
end
|
[View source]
25
26
27
|
# File 'lib/execjs/runtime.rb', line 25
def name
raise NotImplementedError
end
|