Class: LanguageOperator::CLI::Formatters::StatusFormatter
- Inherits:
-
Object
- Object
- LanguageOperator::CLI::Formatters::StatusFormatter
- Extended by:
- Helpers::UxHelper
- Defined in:
- lib/language_operator/cli/formatters/status_formatter.rb
Overview
Unified formatter for status indicators across all commands
Provides consistent colored status dots (●) for resource states
Class Method Summary collapse
-
.dot(status) ⇒ String
Format just the status indicator dot (without text).
-
.format(status) ⇒ String
Format a status string with colored indicator.
Methods included from Helpers::UxHelper
box, highlight_ruby_code, logo, pastel, prompt, spinner, table
Class Method Details
.dot(status) ⇒ String
Format just the status indicator dot (without text)
28 29 30 31 |
# File 'lib/language_operator/cli/formatters/status_formatter.rb', line 28 def self.dot(status) color = status_color(status.to_s) pastel.send(color, '●') end |
.format(status) ⇒ String
Format a status string with colored indicator
18 19 20 21 22 |
# File 'lib/language_operator/cli/formatters/status_formatter.rb', line 18 def self.format(status) status_str = status.to_s color = status_color(status_str) "#{pastel.send(color, '●')} #{status_str}" end |