Class: Ocak::CommandRunner::CommandResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/ocak/command_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



7
8
9
# File 'lib/ocak/command_runner.rb', line 7

def status
  @status
end

#stderrObject

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



7
8
9
# File 'lib/ocak/command_runner.rb', line 7

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



7
8
9
# File 'lib/ocak/command_runner.rb', line 7

def stdout
  @stdout
end

Instance Method Details

#errorObject



16
17
18
# File 'lib/ocak/command_runner.rb', line 16

def error
  stderr[0...500]
end

#outputObject



12
13
14
# File 'lib/ocak/command_runner.rb', line 12

def output
  stdout.strip
end

#success?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/ocak/command_runner.rb', line 8

def success?
  status&.success? == true
end