Class: Bora::Cfn::Status
- Inherits:
-
Object
- Object
- Bora::Cfn::Status
- Defined in:
- lib/bora/cfn/status.rb
Instance Method Summary collapse
- #complete? ⇒ Boolean
- #deleted? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize(status) ⇒ Status
constructor
A new instance of Status.
- #success? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(status) ⇒ Status
Returns a new instance of Status.
6 7 8 |
# File 'lib/bora/cfn/status.rb', line 6 def initialize(status) @status = status end |
Instance Method Details
#complete? ⇒ Boolean
22 23 24 |
# File 'lib/bora/cfn/status.rb', line 22 def complete? success? || failure? end |
#deleted? ⇒ Boolean
18 19 20 |
# File 'lib/bora/cfn/status.rb', line 18 def deleted? @status == 'DELETE_COMPLETE' end |
#failure? ⇒ Boolean
14 15 16 |
# File 'lib/bora/cfn/status.rb', line 14 def failure? @status.end_with?('FAILED') || @status.include?('ROLLBACK') end |
#success? ⇒ Boolean
10 11 12 |
# File 'lib/bora/cfn/status.rb', line 10 def success? @status.end_with?('_COMPLETE') && !@status.include?('ROLLBACK') end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/bora/cfn/status.rb', line 26 def to_s @status.colorize(color) end |