Sha256: 6e16c6d44c6c44d40eb56e139f2dd18fc317cd4c61fcbb0d89083499f7ea2e9e

Contents?: true

Size: 268 Bytes

Versions: 4

Compression:

Stored size: 268 Bytes

Contents

class Knj::Jruby_compiler
	def initialize(args = {})
		@args = args
		
		factory = javax.script.ScriptEngineManager.new
		engine = factory.getEngineByName("jruby")
		code = File.read(args[:path])
		@script = engine.compile(code)
	end
	
	def run
		@script.eval
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
knjrbfw-0.0.8 lib/knj/jruby_compiler.rb
knjrbfw-0.0.7 lib/knj/jruby_compiler.rb
knjrbfw-0.0.4 lib/knj/jruby_compiler.rb
knjrbfw-0.0.3 lib/knj/jruby_compiler.rb