Sha256: 8a0441e3e1f152a22138fdbcc5087927c1455555ce7ae7463528abc02e7844a8
Contents?: true
Size: 486 Bytes
Versions: 147
Compression:
Stored size: 486 Bytes
Contents
require 'v8' module Gherkin # Thin adapter for the Javascript lexer, primarily used for testing. class JsLexer 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}.js") cxt['exports']['Lexer'] end end end
Version data entries
147 entries across 147 versions & 1 rubygems