Class: Buildkite::Pipelines::Command::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/buildkite/pipelines/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#stderrObject (readonly)

Returns the value of attribute stderr.



11
12
13
# File 'lib/buildkite/pipelines/command.rb', line 11

def stderr
  @stderr
end

#stdoutObject (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

#outputObject



22
23
24
# File 'lib/buildkite/pipelines/command.rb', line 22

def output
  @output ||= "#{stdout}\n#{stderr}".strip
end

#success?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/buildkite/pipelines/command.rb', line 18

def success?
  @status.success?
end