Method: Common::Color#which_color
- Defined in:
- lib/common/color.rb
#which_color(state) ⇒ Object
Determines the color depending on the state.
224 225 226 227 228 229 230 231 232 233 |
# File 'lib/common/color.rb', line 224 def which_color(state) case state when "STARTED", "INSTALLED", "COMPLETED" return "green" when "STOPPED", "INSTALL_FAILED", "ABORTED", "FAILED" return "red" else return "yellow" end end |