Class: TTY::Markdown::Color Private
- Inherits:
-
Object
- Object
- TTY::Markdown::Color
- Defined in:
- lib/tty/markdown/color.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Responsible for storing the color configuration
Instance Method Summary collapse
-
#initialize(color) ⇒ Color
constructor
Create a Color instance.
-
#to_enabled ⇒ Boolean?
Convert to the Pastel enabled option.
Constructor Details
#initialize(color) ⇒ Color
Create a TTY::Markdown::Color instance
55 56 57 |
# File 'lib/tty/markdown/color.rb', line 55 def initialize(color) @color = validate(color) end |
Instance Method Details
#to_enabled ⇒ Boolean?
Convert to the Pastel enabled option
67 68 69 70 71 72 |
# File 'lib/tty/markdown/color.rb', line 67 def to_enabled case @color.to_s when ALWAYS then true when NEVER then false end end |