Class: JRubyCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby_art/launcher.rb

Overview

Wrap creation of jruby command string as a class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner, args, filename) ⇒ JRubyCommand

Returns a new instance of JRubyCommand.



51
52
53
54
# File 'lib/jruby_art/launcher.rb', line 51

def initialize(runner, args, filename)
  @runner, @args, @filename = runner, args, filename
  @opts = JRubyOpts.new.opts
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



50
51
52
# File 'lib/jruby_art/launcher.rb', line 50

def args
  @args
end

#filenameObject (readonly)

Returns the value of attribute filename.



50
51
52
# File 'lib/jruby_art/launcher.rb', line 50

def filename
  @filename
end

#optsObject (readonly)

Returns the value of attribute opts.



50
51
52
# File 'lib/jruby_art/launcher.rb', line 50

def opts
  @opts
end

#runnerObject (readonly)

Returns the value of attribute runner.



50
51
52
# File 'lib/jruby_art/launcher.rb', line 50

def runner
  @runner
end

Instance Method Details

#cmdObject



56
57
58
# File 'lib/jruby_art/launcher.rb', line 56

def cmd
  ['jruby', opts, runner, filename, args].flatten
end