Class: Dolt::Git::Process
- Inherits:
-
Object
- Object
- Dolt::Git::Process
- Defined in:
- lib/libdolt/git/process.rb
Instance Attribute Summary collapse
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdin ⇒ Object
readonly
Returns the value of attribute stdin.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
- #exception ⇒ Object
- #exit_code ⇒ Object
-
#initialize(stdin, stdout, stderr, wait_thread) ⇒ Process
constructor
A new instance of Process.
- #success? ⇒ Boolean
Constructor Details
#initialize(stdin, stdout, stderr, wait_thread) ⇒ Process
Returns a new instance of Process.
24 25 26 27 28 29 |
# File 'lib/libdolt/git/process.rb', line 24 def initialize(stdin, stdout, stderr, wait_thread) @stdin = stdin @stdout = stdout @stderr = stderr @wait_thread = wait_thread end |
Instance Attribute Details
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
22 23 24 |
# File 'lib/libdolt/git/process.rb', line 22 def stderr @stderr end |
#stdin ⇒ Object (readonly)
Returns the value of attribute stdin.
22 23 24 |
# File 'lib/libdolt/git/process.rb', line 22 def stdin @stdin end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
22 23 24 |
# File 'lib/libdolt/git/process.rb', line 22 def stdout @stdout end |
Instance Method Details
#exception ⇒ Object
39 40 41 |
# File 'lib/libdolt/git/process.rb', line 39 def exception Exception.new(stderr.read) end |
#exit_code ⇒ Object
35 36 37 |
# File 'lib/libdolt/git/process.rb', line 35 def exit_code process_status.exitstatus end |
#success? ⇒ Boolean
31 32 33 |
# File 'lib/libdolt/git/process.rb', line 31 def success? process_status.success? end |