Class: CleoQualityReview::CommandResult
- Inherits:
-
Struct
- Object
- Struct
- CleoQualityReview::CommandResult
- Defined in:
- lib/cleo_quality_review/command_result.rb
Overview
Value object representing the result of a shell command execution
Instance Attribute Summary collapse
-
#status ⇒ Process::Status
readonly
Process exit status.
-
#stderr ⇒ String
readonly
Standard error from the command.
-
#stdout ⇒ String
readonly
Standard output from the command.
Instance Method Summary collapse
-
#success? ⇒ Boolean
Check if the command succeeded.
Instance Attribute Details
#status ⇒ Process::Status (readonly)
Returns process exit status.
13 14 15 16 17 18 19 20 |
# File 'lib/cleo_quality_review/command_result.rb', line 13 CommandResult = Struct.new(:stdout, :stderr, :status, keyword_init: true) do ## # Check if the command succeeded # @return [Boolean] def success? status.success? end end |
#stderr ⇒ String (readonly)
Returns standard error from the command.
13 14 15 16 17 18 19 20 |
# File 'lib/cleo_quality_review/command_result.rb', line 13 CommandResult = Struct.new(:stdout, :stderr, :status, keyword_init: true) do ## # Check if the command succeeded # @return [Boolean] def success? status.success? end end |
#stdout ⇒ String (readonly)
Returns standard output from the command.
13 14 15 16 17 18 19 20 |
# File 'lib/cleo_quality_review/command_result.rb', line 13 CommandResult = Struct.new(:stdout, :stderr, :status, keyword_init: true) do ## # Check if the command succeeded # @return [Boolean] def success? status.success? end end |
Instance Method Details
#success? ⇒ Boolean
Check if the command succeeded
17 18 19 |
# File 'lib/cleo_quality_review/command_result.rb', line 17 def success? status.success? end |