Sha256: f277f75d6418a3e19ec839ac8777b79b3b39a4ef7eb6f9b8f3f04f9cd6864fea

Contents?: true

Size: 287 Bytes

Versions: 101

Compression:

Stored size: 287 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

101 entries across 101 versions & 1 rubygems

Version Path
knjrbfw-0.0.72 lib/knj/jruby_compiler.rb
knjrbfw-0.0.71 lib/knj/jruby_compiler.rb
knjrbfw-0.0.70 lib/knj/jruby_compiler.rb
knjrbfw-0.0.69 lib/knj/jruby_compiler.rb
knjrbfw-0.0.68 lib/knj/jruby_compiler.rb
knjrbfw-0.0.67 lib/knj/jruby_compiler.rb
knjrbfw-0.0.66 lib/knj/jruby_compiler.rb
knjrbfw-0.0.65 lib/knj/jruby_compiler.rb
knjrbfw-0.0.64 lib/knj/jruby_compiler.rb
knjrbfw-0.0.63 lib/knj/jruby_compiler.rb
knjrbfw-0.0.62 lib/knj/jruby_compiler.rb
knjrbfw-0.0.59 lib/knj/jruby_compiler.rb
knjrbfw-0.0.58 lib/knj/jruby_compiler.rb
knjrbfw-0.0.57 lib/knj/jruby_compiler.rb
knjrbfw-0.0.55 lib/knj/jruby_compiler.rb
knjrbfw-0.0.54 lib/knj/jruby_compiler.rb
knjrbfw-0.0.53 lib/knj/jruby_compiler.rb
knjrbfw-0.0.52 lib/knj/jruby_compiler.rb
knjrbfw-0.0.51 lib/knj/jruby_compiler.rb
knjrbfw-0.0.50 lib/knj/jruby_compiler.rb