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.
13 14 15 16 |
# File 'lib/eac_cli/enum.rb', line 13 def initialize(key, color) super(key) @color = color end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
11 12 13 |
# File 'lib/eac_cli/enum.rb', line 11 def color @color end |
Instance Method Details
#to_bg_label ⇒ String
31 32 33 |
# File 'lib/eac_cli/enum.rb', line 31 def to_bg_label to_fg_bg_label(TO_BG_LABEL_FG_COLOR, color) end |
#to_fg_label ⇒ String
26 27 28 |
# File 'lib/eac_cli/enum.rb', line 26 def to_fg_label to_fg_bg_label(color) end |
#to_label ⇒ String
21 22 23 |
# File 'lib/eac_cli/enum.rb', line 21 def to_label to_fg_label end |