Sha256: 6405e4f83d21d50919af7901b414bd9d5ecdffed9ef2d6ddfe660c70b6169009
Contents?: true
Size: 490 Bytes
Versions: 97
Compression:
Stored size: 490 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}.min.js") cxt['exports']['Lexer'] end end end
Version data entries
97 entries across 96 versions & 5 rubygems