Class: Exots::Runner
- Inherits:
-
Object
- Object
- Exots::Runner
- Defined in:
- lib/exots/runner.rb
Constant Summary collapse
- Node =
new('node')
- Bun =
new('bun')
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#bin ⇒ Object
readonly
Returns the value of attribute bin.
Instance Method Summary collapse
- #command(script, socket_path, pid_path = nil) ⇒ Object
-
#initialize(bin, args: []) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(bin, args: []) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 |
# File 'lib/exots/runner.rb', line 7 def initialize(bin, args: []) @bin = bin @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
5 6 7 |
# File 'lib/exots/runner.rb', line 5 def args @args end |
#bin ⇒ Object (readonly)
Returns the value of attribute bin.
5 6 7 |
# File 'lib/exots/runner.rb', line 5 def bin @bin end |
Instance Method Details
#command(script, socket_path, pid_path = nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/exots/runner.rb', line 12 def command(script, socket_path, pid_path = nil) cmd_args = [@bin] + @args + [script, '--socket', socket_path] cmd_args += ['--pid', pid_path] if pid_path cmd_args end |