Module: I18nFlow::CLI::Color
- Included in:
- FormatCommand, LintCommand::AsciiRenderer, SearchCommand::DefaultRenderer, SearchCommand::OnelineRenderer
- Defined in:
- lib/i18n_flow/cli/color.rb
Constant Summary collapse
- COLORS =
{ black: 30, red: 31, green: 32, yellow: 33, blue: 34, magenta: 35, cyan: 36, white: 37, }.freeze
Instance Method Summary collapse
Instance Method Details
#color(str, c) ⇒ Object
14 15 16 |
# File 'lib/i18n_flow/cli/color.rb', line 14 def color(str, c) "\e[1;#{COLORS[c]}m#{str}\e[0m" end |