Class: Avm::Launcher::Publish::CheckResult
- Inherits:
-
Object
- Object
- Avm::Launcher::Publish::CheckResult
- Includes:
- EacRubyUtils::Listable
- Defined in:
- lib/avm/launcher/publish/check_result.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
- .blocked_color ⇒ Object
- .outdated_color ⇒ Object
- .pending_color ⇒ Object
- .pending_status?(status) ⇒ Boolean
- .updated_color ⇒ Object
Instance Method Summary collapse
-
#initialize(status, message) ⇒ CheckResult
constructor
A new instance of CheckResult.
- #to_s ⇒ Object
Constructor Details
#initialize(status, message) ⇒ CheckResult
Returns a new instance of CheckResult.
45 46 47 48 49 50 51 |
# File 'lib/avm/launcher/publish/check_result.rb', line 45 def initialize(status, ) raise "Status \"#{status}\" not in #{self.class.lists.status.values}" unless self.class.lists.status.values.include?(status) @status = status @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
43 44 45 |
# File 'lib/avm/launcher/publish/check_result.rb', line 43 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
43 44 45 |
# File 'lib/avm/launcher/publish/check_result.rb', line 43 def status @status end |
Class Method Details
.blocked_color ⇒ Object
34 35 36 |
# File 'lib/avm/launcher/publish/check_result.rb', line 34 def blocked_color 'red' end |
.outdated_color ⇒ Object
38 39 40 |
# File 'lib/avm/launcher/publish/check_result.rb', line 38 def outdated_color 'light_blue' end |
.pending_color ⇒ Object
30 31 32 |
# File 'lib/avm/launcher/publish/check_result.rb', line 30 def pending_color 'yellow' end |
.pending_status?(status) ⇒ Boolean
22 23 24 |
# File 'lib/avm/launcher/publish/check_result.rb', line 22 def pending_status?(status) [STATUS_PENDING].include?(status) end |
.updated_color ⇒ Object
26 27 28 |
# File 'lib/avm/launcher/publish/check_result.rb', line 26 def updated_color 'green' end |
Instance Method Details
#to_s ⇒ Object
53 54 55 |
# File 'lib/avm/launcher/publish/check_result.rb', line 53 def to_s .light_white.send("on_#{background_color}") end |