Sha256: 984d235f23b3e8cb8f5d21400387024ef70daa4a207cc3dea9f843e7762218f2
Contents?: true
Size: 669 Bytes
Versions: 5
Compression:
Stored size: 669 Bytes
Contents
require 'colorize' class Bora module Cfn class Status def initialize(status) @status = status end def success? @status.end_with?('_COMPLETE') && !@status.include?('ROLLBACK') end def failure? @status.end_with?('FAILED') || @status.include?('ROLLBACK') end def deleted? @status == 'DELETE_COMPLETE' end def complete? success? || failure? end def to_s @status.colorize(color) end private def color if success? then :green elsif failure? then :red else; :yellow end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bora-1.7.4 | lib/bora/cfn/status.rb |
bora-1.7.3 | lib/bora/cfn/status.rb |
bora-1.7.2 | lib/bora/cfn/status.rb |
bora-1.7.1 | lib/bora/cfn/status.rb |
bora-1.7.0 | lib/bora/cfn/status.rb |