Class: GitLab::Monitor::CommandResult
- Inherits:
-
Struct
- Object
- Struct
- GitLab::Monitor::CommandResult
- Defined in:
- lib/gitlab_monitor/git.rb
Overview
Result of a command
Provides some handy methods for checking if the execution failed and a simple to_s that will return the command output
Instance Attribute Summary collapse
-
#status ⇒ Object
Returns the value of attribute status.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
Instance Attribute Details
#status ⇒ Object
Returns the value of attribute status
46 47 48 |
# File 'lib/gitlab_monitor/git.rb', line 46 def status @status end |
#stdout ⇒ Object
Returns the value of attribute stdout
46 47 48 |
# File 'lib/gitlab_monitor/git.rb', line 46 def stdout @stdout end |
Instance Method Details
#failed? ⇒ Boolean
47 48 49 |
# File 'lib/gitlab_monitor/git.rb', line 47 def failed? status.nonzero? end |
#to_s ⇒ Object
55 56 57 |
# File 'lib/gitlab_monitor/git.rb', line 55 def to_s stdout end |