Module: Escodegen

Defined in:
lib/escodegen.rb,
lib/escodegen/version.rb,
lib/escodegen/generator.rb

Defined Under Namespace

Classes: Generator

Constant Summary collapse

VERSION =
"1.2.0"

Class Method Summary collapse

Class Method Details

.load_pathObject



10
11
12
# File 'lib/escodegen.rb', line 10

def load_path
  @load_path ||= File.expand_path(File.join(File.dirname(__FILE__), "../vendor"))
end

.new_environmentObject



14
15
16
17
18
# File 'lib/escodegen.rb', line 14

def new_environment
  context = new_context
  env = CommonJS::Environment.new(context, :path => Escodegen.load_path)
  env.require("escodegen")
end