Parent

Namespace

Methods

Gherkin::JsLexer

Thin adapter for the Javascript lexer, primarily used for testing.

Public Class Methods

[](i18n_underscored_iso_code) click to toggle source
# File lib/gherkin/js_lexer.rb, line 6
def self.[](i18n_underscored_iso_code)
  cxt = V8::Context.new
  cxt['exports'] = {}

  # Mimic Node.js / Firebug console.log
  cxt['console'] = STDOUT
  def STDOUT.log(*a)
    p a
  end

  cxt.load(File.dirname(__FILE__) + "/../../js/lib/gherkin/lexer/#{i18n_underscored_iso_code}.min.js")
  cxt['exports']['Lexer']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.