Class: JavaCommand
- Inherits:
-
Object
- Object
- JavaCommand
- Defined in:
- lib/jruby_art/launcher.rb
Overview
Wrap creation of java command string as a class
Constant Summary collapse
- MAIN =
'org.jruby.Main'.freeze
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#complete ⇒ Object
readonly
Returns the value of attribute complete.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(runner, args, filename) ⇒ JavaCommand
constructor
A new instance of JavaCommand.
Constructor Details
#initialize(runner, args, filename) ⇒ JavaCommand
Returns a new instance of JavaCommand.
37 38 39 40 41 |
# File 'lib/jruby_art/launcher.rb', line 37 def initialize(runner, args, filename) @runner, @args, @filename = runner, args, filename @complete = JRubyComplete.complete @opts = JavaOpts.new.opts end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
36 37 38 |
# File 'lib/jruby_art/launcher.rb', line 36 def args @args end |
#complete ⇒ Object (readonly)
Returns the value of attribute complete.
36 37 38 |
# File 'lib/jruby_art/launcher.rb', line 36 def complete @complete end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
36 37 38 |
# File 'lib/jruby_art/launcher.rb', line 36 def filename @filename end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
36 37 38 |
# File 'lib/jruby_art/launcher.rb', line 36 def opts @opts end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
36 37 38 |
# File 'lib/jruby_art/launcher.rb', line 36 def runner @runner end |
Instance Method Details
#cmd ⇒ Object
43 44 45 |
# File 'lib/jruby_art/launcher.rb', line 43 def cmd ['java', opts, '-cp', complete, MAIN, runner, filename, args].flatten end |