Class: Buildkite::Pipelines::Command::Result
- Inherits:
- 
      Object
      
        - Object
- Buildkite::Pipelines::Command::Result
 
- Defined in:
- lib/buildkite/pipelines/command.rb
Instance Attribute Summary collapse
- 
  
    
      #stderr  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute stderr. 
- 
  
    
      #stdout  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute stdout. 
Instance Method Summary collapse
- 
  
    
      #initialize(stdout, stderr, status)  ⇒ Result 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Result. 
- #output ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(stdout, stderr, status) ⇒ Result
Returns a new instance of Result.
| 12 13 14 15 16 | # File 'lib/buildkite/pipelines/command.rb', line 12 def initialize(stdout, stderr, status) @stdout = stdout.strip @stderr = stderr.strip @status = status end | 
Instance Attribute Details
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
| 11 12 13 | # File 'lib/buildkite/pipelines/command.rb', line 11 def stderr @stderr end | 
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
| 11 12 13 | # File 'lib/buildkite/pipelines/command.rb', line 11 def stdout @stdout end | 
Instance Method Details
#output ⇒ Object
| 22 23 24 | # File 'lib/buildkite/pipelines/command.rb', line 22 def output @output ||= "#{stdout}\n#{stderr}".strip end | 
#success? ⇒ Boolean
| 18 19 20 | # File 'lib/buildkite/pipelines/command.rb', line 18 def success? @status.success? end |