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.



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

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



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

def args
  @args
end

#filenameObject (readonly)

Returns the value of attribute filename.



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

def filename
  @filename
end

#optsObject (readonly)

Returns the value of attribute opts.



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

def opts
  @opts
end

#runnerObject (readonly)

Returns the value of attribute runner.



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

def runner
  @runner
end

Instance Method Details

#cmdObject



61
62
63
# File 'lib/jruby_art/launcher.rb', line 61

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