Class: Fleetctl::Runner::Runner
- Inherits:
-
Object
- Object
- Fleetctl::Runner::Runner
- Defined in:
- lib/fleetctl/runner/runner.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#exit_signal ⇒ Object
readonly
Returns the value of attribute exit_signal.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr_data ⇒ Object
readonly
Returns the value of attribute stderr_data.
-
#stdout_data ⇒ Object
readonly
Returns the value of attribute stdout_data.
Instance Method Summary collapse
-
#initialize(*command) ⇒ Runner
constructor
A new instance of Runner.
- #output ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(*command) ⇒ Runner
Returns a new instance of Runner.
6 7 8 |
# File 'lib/fleetctl/runner/runner.rb', line 6 def initialize(*command) @command = [*command].flatten.compact.join(' ') end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
4 5 6 |
# File 'lib/fleetctl/runner/runner.rb', line 4 def command @command end |
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
4 5 6 |
# File 'lib/fleetctl/runner/runner.rb', line 4 def exit_code @exit_code end |
#exit_signal ⇒ Object (readonly)
Returns the value of attribute exit_signal.
4 5 6 |
# File 'lib/fleetctl/runner/runner.rb', line 4 def exit_signal @exit_signal end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/fleetctl/runner/runner.rb', line 4 def status @status end |
#stderr_data ⇒ Object (readonly)
Returns the value of attribute stderr_data.
4 5 6 |
# File 'lib/fleetctl/runner/runner.rb', line 4 def stderr_data @stderr_data end |
#stdout_data ⇒ Object (readonly)
Returns the value of attribute stdout_data.
4 5 6 |
# File 'lib/fleetctl/runner/runner.rb', line 4 def stdout_data @stdout_data end |
Instance Method Details
#output ⇒ Object
14 15 16 |
# File 'lib/fleetctl/runner/runner.rb', line 14 def output @output || run end |
#run ⇒ Object
10 11 12 |
# File 'lib/fleetctl/runner/runner.rb', line 10 def run(*) fail NotImplementedError end |