Class: Kettle::Family::ReleaseStateResult
- Inherits:
-
Object
- Object
- Kettle::Family::ReleaseStateResult
- Defined in:
- lib/kettle/family/release_state_result.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#elapsed_seconds ⇒ Object
readonly
Returns the value of attribute elapsed_seconds.
-
#member_name ⇒ Object
readonly
Returns the value of attribute member_name.
-
#phase ⇒ Object
readonly
Returns the value of attribute phase.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#skipped ⇒ Object
readonly
Returns the value of attribute skipped.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#workdir ⇒ Object
readonly
Returns the value of attribute workdir.
Instance Method Summary collapse
-
#initialize(member_name:, command:, workdir:, status:, success:, stdout:, stderr:, elapsed_seconds:, state:, reason: nil, branch: nil) ⇒ ReleaseStateResult
constructor
A new instance of ReleaseStateResult.
- #ok? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize(member_name:, command:, workdir:, status:, success:, stdout:, stderr:, elapsed_seconds:, state:, reason: nil, branch: nil) ⇒ ReleaseStateResult
Returns a new instance of ReleaseStateResult.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kettle/family/release_state_result.rb', line 8 def initialize(member_name:, command:, workdir:, status:, success:, stdout:, stderr:, elapsed_seconds:, state:, reason: nil, branch: nil) @member_name = member_name @phase = "release_state" @command = command @workdir = workdir @status = status @success = success @stdout = stdout @stderr = stderr @elapsed_seconds = elapsed_seconds @skipped = false @reason = reason @state = state @branch = branch end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def branch @branch end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def command @command end |
#elapsed_seconds ⇒ Object (readonly)
Returns the value of attribute elapsed_seconds.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def elapsed_seconds @elapsed_seconds end |
#member_name ⇒ Object (readonly)
Returns the value of attribute member_name.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def member_name @member_name end |
#phase ⇒ Object (readonly)
Returns the value of attribute phase.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def phase @phase end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def reason @reason end |
#skipped ⇒ Object (readonly)
Returns the value of attribute skipped.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def skipped @skipped end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def state @state end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def stdout @stdout end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def success @success end |
#workdir ⇒ Object (readonly)
Returns the value of attribute workdir.
6 7 8 |
# File 'lib/kettle/family/release_state_result.rb', line 6 def workdir @workdir end |
Instance Method Details
#ok? ⇒ Boolean
24 25 26 |
# File 'lib/kettle/family/release_state_result.rb', line 24 def ok? success end |
#to_h ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/kettle/family/release_state_result.rb', line 28 def to_h { "member" => member_name, "phase" => phase, "command" => command, "workdir" => workdir, "status" => status, "success" => success, "stdout" => stdout.to_s.lines.last(20).map(&:chomp).join("\n"), "stderr" => stderr.to_s.lines.last(20).map(&:chomp).join("\n"), "elapsed_seconds" => elapsed_seconds, "skipped" => skipped, "reason" => reason, "branch" => branch, "release_state" => state } end |