Class: Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/logger.rb

Overview

Provides utility methods for formatting strings

Class Method Summary collapse

Class Method Details

.string(key, value) ⇒ String

Formats a key-value pair as a string with colored output

Parameters:

  • key (String)

    The key to be formatted

  • value (String)

    The value to be formatted

Returns:

  • (String)

    The formatted key-value pair as a string



86
87
88
# File 'lib/logger.rb', line 86

def self.string(key, value)
  "#{Paint[key, :green]}: #{Paint[value, :blue]}"
end