Class: Overcommit::Subprocess::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/overcommit/subprocess.rb

Overview

Encapsulates the result of a process.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusInteger (readonly)

exit status code returned by process

Returns:

  • (Integer)

    the current value of status



15
16
17
# File 'lib/overcommit/subprocess.rb', line 15

def status
  @status
end

#stderrString (readonly)

standard error stream output

Returns:

  • (String)

    the current value of stderr



15
16
17
# File 'lib/overcommit/subprocess.rb', line 15

def stderr
  @stderr
end

#stdoutString (readonly)

standard output stream output

Returns:

  • (String)

    the current value of stdout



15
16
17
# File 'lib/overcommit/subprocess.rb', line 15

def stdout
  @stdout
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/overcommit/subprocess.rb', line 16

def success?
  status == 0
end