Module: ExecJS::Xtrn
- Defined in:
- lib/execjs/xtrn/version.rb,
lib/execjs/xtrn.rb
Defined Under Namespace
Modules: Rack Classes: Child, Engine, Error, Node, Nvm, Wsh
Constant Summary collapse
- VERSION =
"1.1.4"- Engines =
[Nvm, Node, Wsh]
Class Attribute Summary collapse
-
.engine ⇒ Object
Returns the value of attribute engine.
Class Method Summary collapse
-
.init ⇒ Object
Install into ExecJS.
- .stats ⇒ Object
Class Attribute Details
.engine ⇒ Object
Returns the value of attribute engine.
8 9 10 |
# File 'lib/execjs/xtrn.rb', line 8 def engine @engine end |
Class Method Details
.init ⇒ Object
Install into ExecJS
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/execjs/xtrn.rb', line 15 def self.init slf=self sc=(class << ExecJS; self ;end) Engine.methods(false).each do |m| sc.instance_eval do define_method(m) do |*args| slf.engine.send m, *args end end end end |
.stats ⇒ Object
29 30 31 |
# File 'lib/execjs/xtrn.rb', line 29 def self.stats Hash[([Child, Engine]+Engines).map{|k| [k.name.sub(/.*\W/, ''), k.stats]}] end |