Class: Git::CommandLine::Result
- Inherits:
-
Object
- Object
- Git::CommandLine::Result
- 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 ⇒ ProcessExecuter::Result
readonly
The process result object returned by ProcessExecuter.
-
#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) ⇒ Result
constructor
Create a Result object.
Constructor Details
#initialize(git_cmd, status, stdout, stderr) ⇒ Result
Create a Result object
31 32 33 34 35 36 |
# File 'lib/git/command_line/result.rb', line 31 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
49 50 51 |
# File 'lib/git/command_line/result.rb', line 49 def git_cmd @git_cmd end |
#status ⇒ ProcessExecuter::Result (readonly)
67 68 69 |
# File 'lib/git/command_line/result.rb', line 67 def status @status end |
#stderr ⇒ String (readonly)
The error output of the process
93 94 95 |
# File 'lib/git/command_line/result.rb', line 93 def stderr @stderr end |
#stdout ⇒ String (readonly)
The output of the process
80 81 82 |
# File 'lib/git/command_line/result.rb', line 80 def stdout @stdout end |