Class: R10K::Util::Subprocess::Runner Private
- Inherits:
-
Object
- Object
- R10K::Util::Subprocess::Runner
- Defined in:
- lib/r10k/util/subprocess/runner.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Define an abstract interface for external command runners.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cwd ⇒ String
The directory to be used as the cwd when executing the command.
- #io ⇒ Object readonly private
- #pid ⇒ Object readonly private
- #result ⇒ Object readonly private
- #status ⇒ Object readonly private
Instance Method Summary collapse
-
#crashed? ⇒ Boolean
private
Did the given process exit with a non-zero exit code?.
-
#exit_code ⇒ Integer
private
The exit status of the given process.
-
#initialize(argv) ⇒ Runner
constructor
private
A new instance of Runner.
- #run ⇒ Object private
-
#start ⇒ Object
private
Start the process asynchronously and return.
-
#wait ⇒ Object
private
Wait for the process to exit.
Constructor Details
#initialize(argv) ⇒ Runner
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Runner.
23 24 25 |
# File 'lib/r10k/util/subprocess/runner.rb', line 23 def initialize(argv) raise NotImplementedError end |
Instance Attribute Details
#cwd ⇒ String
Returns The directory to be used as the cwd when executing the command.
9 10 11 |
# File 'lib/r10k/util/subprocess/runner.rb', line 9 def cwd @cwd end |
#io ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/r10k/util/subprocess/runner.rb', line 11 def io @io end |
#pid ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/r10k/util/subprocess/runner.rb', line 13 def pid @pid end |
#result ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/r10k/util/subprocess/runner.rb', line 21 def result @result end |
#status ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/r10k/util/subprocess/runner.rb', line 17 def status @status end |
Instance Method Details
#crashed? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Did the given process exit with a non-zero exit code?
42 43 44 |
# File 'lib/r10k/util/subprocess/runner.rb', line 42 def crashed? raise NotImplementedError end |
#exit_code ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The exit status of the given process.
47 48 49 |
# File 'lib/r10k/util/subprocess/runner.rb', line 47 def exit_code raise NotImplementedError end |
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/r10k/util/subprocess/runner.rb', line 27 def run raise NotImplementedError end |
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Start the process asynchronously and return. Not all runners will implement this.
32 33 34 |
# File 'lib/r10k/util/subprocess/runner.rb', line 32 def start raise NotImplementedError end |
#wait ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Wait for the process to exit. Not all runners will implement this.
37 38 39 |
# File 'lib/r10k/util/subprocess/runner.rb', line 37 def wait raise NotImplementedError end |