Module: Esprima
- Defined in:
- lib/esprima.rb,
lib/esprima/ast.rb,
lib/esprima/parser.rb,
lib/esprima/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"1.4.3"
Class Method Summary collapse
Class Method Details
.load_path ⇒ Object
15 16 17 |
# File 'lib/esprima.rb', line 15 def load_path @load_path ||= File.(File.join(File.dirname(__FILE__), "../vendor")) end |
.new_environment ⇒ Object
19 20 21 22 23 |
# File 'lib/esprima.rb', line 19 def new_environment context = new_context env = CommonJS::Environment.new(context, :path => Esprima.load_path) env.require("esprima") end |