Class: LanguageOperator::CLI::Formatters::StatusFormatter

Inherits:
Object
  • Object
show all
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

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)

Parameters:

  • status (String, Symbol)

    The status to format

Returns:

  • (String)

    Just the colored dot



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

Parameters:

  • status (String, Symbol)

    The status to format

Returns:

  • (String)

    Formatted status with colored dot



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