Class: R10K::Util::Subprocess::Result Private
- Inherits:
-
Object
- Object
- R10K::Util::Subprocess::Result
- Defined in:
- lib/r10k/util/subprocess/result.rb
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.
Instance Attribute Summary collapse
- #argv ⇒ Object readonly private
- #cmd ⇒ Object readonly private
- #exit_code ⇒ Object readonly private
- #stderr ⇒ Object readonly private
- #stdout ⇒ Object readonly private
Instance Method Summary collapse
- #[](field) ⇒ Object private
- #failed? ⇒ Boolean private
-
#initialize(argv, stdout, stderr, exit_code) ⇒ Result
constructor
private
A new instance of Result.
- #success? ⇒ Boolean private
Constructor Details
#initialize(argv, stdout, stderr, exit_code) ⇒ Result
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 Result.
24 25 26 27 28 29 30 |
# File 'lib/r10k/util/subprocess/result.rb', line 24 def initialize(argv, stdout, stderr, exit_code) @argv = argv @cmd = argv.join(' ') @stdout = stdout @stderr = stderr @exit_code = exit_code end |
Instance Attribute Details
#argv ⇒ 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.
6 7 8 |
# File 'lib/r10k/util/subprocess/result.rb', line 6 def argv @argv end |
#cmd ⇒ 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.
10 11 12 |
# File 'lib/r10k/util/subprocess/result.rb', line 10 def cmd @cmd end |
#exit_code ⇒ 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.
22 23 24 |
# File 'lib/r10k/util/subprocess/result.rb', line 22 def exit_code @exit_code end |
#stderr ⇒ 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.
18 19 20 |
# File 'lib/r10k/util/subprocess/result.rb', line 18 def stderr @stderr end |
#stdout ⇒ 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.
14 15 16 |
# File 'lib/r10k/util/subprocess/result.rb', line 14 def stdout @stdout end |
Instance Method Details
#[](field) ⇒ 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.
32 33 34 |
# File 'lib/r10k/util/subprocess/result.rb', line 32 def [](field) send(field) end |
#failed? ⇒ 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.
36 37 38 |
# File 'lib/r10k/util/subprocess/result.rb', line 36 def failed? exit_code != 0 end |
#success? ⇒ 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.
40 41 42 |
# File 'lib/r10k/util/subprocess/result.rb', line 40 def success? exit_code == 0 end |