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.1"- 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 |
# File 'lib/execjs/xtrn.rb', line 15 def self.init slf=self sc=(class<<ExecJS;self;end) Engine.methods(false).each{|m| sc.instance_eval{define_method(m){|*args| slf.engine.send m, *args }}} end |
.stats ⇒ Object
23 24 25 |
# File 'lib/execjs/xtrn.rb', line 23 def self.stats Hash[([Child, Engine]+Engines).map{|k| [k.name.sub(/.*\W/, ''), k.stats]}] end |