Class: Git::CommandLineResult
- Inherits:
-
Object
- Object
- Git::CommandLineResult
- Defined in:
- lib/git/command_line_result.rb
Overview
The result of running a git command
This object stores the Git command executed and its status, stdout, and stderr.
Instance Attribute Summary collapse
-
#git_cmd ⇒ Array<String>
readonly
The git command that was executed.
-
#status ⇒ Process::Status
readonly
The status of the process.
-
#stderr ⇒ String
readonly
The error output of the process.
-
#stdout ⇒ String
readonly
The output of the process.
Instance Method Summary collapse
-
#initialize(git_cmd, status, stdout, stderr) ⇒ CommandLineResult
constructor
Create a CommandLineResult object.
Constructor Details
#initialize(git_cmd, status, stdout, stderr) ⇒ CommandLineResult
Create a CommandLineResult object
26 27 28 29 30 31 |
# File 'lib/git/command_line_result.rb', line 26 def initialize(git_cmd, status, stdout, stderr) @git_cmd = git_cmd @status = status @stdout = stdout @stderr = stderr end |
Instance Attribute Details
#git_cmd ⇒ Array<String> (readonly)
The git command that was executed
44 45 46 |
# File 'lib/git/command_line_result.rb', line 44 def git_cmd @git_cmd end |
#status ⇒ Process::Status (readonly)
The status of the process
58 59 60 |
# File 'lib/git/command_line_result.rb', line 58 def status @status end |
#stderr ⇒ String (readonly)
The error output of the process
84 85 86 |
# File 'lib/git/command_line_result.rb', line 84 def stderr @stderr end |
#stdout ⇒ String (readonly)
The output of the process
71 72 73 |
# File 'lib/git/command_line_result.rb', line 71 def stdout @stdout end |