Class: EacCli::Enum
- Defined in:
- lib/eac_cli/enum.rb
Overview
A [EacRubyUtils::Enum] which each value is associated with one console color.
Constant Summary collapse
- TO_BG_LABEL_FG_COLOR =
Foreground color used in [to_bg_label]
:light_white
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
Instance Method Summary collapse
-
#initialize(key, color) ⇒ Enum
constructor
A new instance of Enum.
- #to_bg_label ⇒ String
- #to_fg_label ⇒ String
- #to_label ⇒ String
Constructor Details
#initialize(key, color) ⇒ Enum
Returns a new instance of Enum.
11 12 13 14 |
# File 'lib/eac_cli/enum.rb', line 11 def initialize(key, color) super(key) @color = color end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
9 10 11 |
# File 'lib/eac_cli/enum.rb', line 9 def color @color end |
Instance Method Details
#to_bg_label ⇒ String
29 30 31 |
# File 'lib/eac_cli/enum.rb', line 29 def to_bg_label to_fg_bg_label(TO_BG_LABEL_FG_COLOR, color) end |
#to_fg_label ⇒ String
24 25 26 |
# File 'lib/eac_cli/enum.rb', line 24 def to_fg_label to_fg_bg_label(color) end |
#to_label ⇒ String
19 20 21 |
# File 'lib/eac_cli/enum.rb', line 19 def to_label to_fg_label end |