Class: Flagdoc::Priority
- Inherits:
-
Object
- Object
- Flagdoc::Priority
- Defined in:
- lib/flagdoc/priority.rb
Overview
Define priorities levels
Constant Summary collapse
- LEVELS =
{ 'LOW' => '29', 'NORMAL' => '166', 'HIGH' => '196' }.freeze
Class Method Summary collapse
-
.available?(priority) ⇒ Boolean
True if the priority is available.
-
.color_code(priority) ⇒ String
With bash color code.
Class Method Details
.available?(priority) ⇒ Boolean
Returns true if the priority is available.
27 28 29 |
# File 'lib/flagdoc/priority.rb', line 27 def available?(priority) LEVELS.key?(priority) end |
.color_code(priority) ⇒ String
Returns with bash color code.
34 35 36 |
# File 'lib/flagdoc/priority.rb', line 34 def color_code(priority) '48;5;' + LEVELS[priority] end |