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

Class Method Summary collapse

Class Attribute Details

.engineObject

Returns the value of attribute engine.



8
9
10
# File 'lib/execjs/xtrn.rb', line 8

def engine
  @engine
end

Class Method Details

.initObject

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

.statsObject



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