Class: WeasyRb::Executor::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/weasy_rb/executor.rb

Overview

Result class to encapsulate command execution results

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success:, output: "", error: "", exit_status: nil) ⇒ Result

Returns a new instance of Result.



10
11
12
# File 'lib/weasy_rb/executor.rb', line 10

def initialize(success:, output: "", error: "", exit_status: nil)
  super(success, output, error, exit_status)
end

Instance Attribute Details

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



9
10
11
# File 'lib/weasy_rb/executor.rb', line 9

def error
  @error
end

#exit_statusObject

Returns the value of attribute exit_status

Returns:

  • (Object)

    the current value of exit_status



9
10
11
# File 'lib/weasy_rb/executor.rb', line 9

def exit_status
  @exit_status
end

#outputObject

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



9
10
11
# File 'lib/weasy_rb/executor.rb', line 9

def output
  @output
end

#success?Object

Returns the value of attribute success?

Returns:

  • (Object)

    the current value of success?



9
10
11
# File 'lib/weasy_rb/executor.rb', line 9

def success?
  @success?
end