Class: Carson::Revision
- Inherits:
-
Object
- Object
- Carson::Revision
- Defined in:
- lib/carson/revision.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#finished_at ⇒ Object
readonly
Returns the value of attribute finished_at.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
- #completed? ⇒ Boolean
- #failed? ⇒ Boolean
-
#initialize(number:, cause:, provider:, status:, started_at:, finished_at:, summary:) ⇒ Revision
constructor
A new instance of Revision.
- #open? ⇒ Boolean
Constructor Details
#initialize(number:, cause:, provider:, status:, started_at:, finished_at:, summary:) ⇒ Revision
Returns a new instance of Revision.
6 7 8 9 10 11 12 13 14 |
# File 'lib/carson/revision.rb', line 6 def initialize( number:, cause:, provider:, status:, started_at:, finished_at:, summary: ) @number = number @cause = cause @provider = provider @status = status @started_at = started_at @finished_at = finished_at @summary = summary end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def cause @cause end |
#finished_at ⇒ Object (readonly)
Returns the value of attribute finished_at.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def finished_at @finished_at end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def number @number end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def provider @provider end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def started_at @started_at end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def status @status end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
4 5 6 |
# File 'lib/carson/revision.rb', line 4 def summary @summary end |
Instance Method Details
#completed? ⇒ Boolean
20 21 22 |
# File 'lib/carson/revision.rb', line 20 def completed? status == "completed" end |
#failed? ⇒ Boolean
24 25 26 |
# File 'lib/carson/revision.rb', line 24 def failed? %w[failed stalled].include?( status ) end |
#open? ⇒ Boolean
16 17 18 |
# File 'lib/carson/revision.rb', line 16 def open? %w[queued running].include?( status ) end |