Class: Dolt::Git::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/libdolt/git/process.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#stderrObject (readonly)

Returns the value of attribute stderr.



22
23
24
# File 'lib/libdolt/git/process.rb', line 22

def stderr
  @stderr
end

#stdinObject (readonly)

Returns the value of attribute stdin.



22
23
24
# File 'lib/libdolt/git/process.rb', line 22

def stdin
  @stdin
end

#stdoutObject (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

#exceptionObject



39
40
41
# File 'lib/libdolt/git/process.rb', line 39

def exception
  Exception.new(stderr.read)
end

#exit_codeObject



35
36
37
# File 'lib/libdolt/git/process.rb', line 35

def exit_code
  process_status.exitstatus
end

#success?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/libdolt/git/process.rb', line 31

def success?
  process_status.success?
end