Sha256: 54b29ca30f30235fc1fa96df12779e7cd22dd234adfb0446f0a53413116950b3

Contents?: true

Size: 823 Bytes

Versions: 72

Compression:

Stored size: 823 Bytes

Contents

class KuberKit::UI::Debug < KuberKit::UI::Simple
  def print_info(title, text)
    print_text(text, color: String::Colors::BLUE)
  end

  def print_error(title, text)
    print_text(text, color: String::Colors::RED)
  end

  def print_warning(title, text)
    print_text(text, color: String::Colors::YELLOW)
    logger.debug(text)
  end

  def print_debug(title, text)
    print_text(text, color: nil)
    logger.debug(text)
  end

  def print_result(message, data = {})
    print_debug("Result", "---------------------------")
    print_debug("Result", message)
    print_debug("Result", "---------------------------")
  end

  protected
    def print_text(text, color: nil)
      colorized_message = color ? text.colorize(color) : text
      puts "  #{Time.now.strftime("%H:%M:%S").grey} #{colorized_message}"
    end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
kuber_kit-1.3.8 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.7 lib/kuber_kit/ui/debug.rb
kuber_kit-1.1.8 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.6 lib/kuber_kit/ui/debug.rb
kuber_kit-1.1.7 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.5 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.4 lib/kuber_kit/ui/debug.rb
kuber_kit-1.1.6 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.3 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.2 lib/kuber_kit/ui/debug.rb
kuber_kit-1.1.5 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.1 lib/kuber_kit/ui/debug.rb
kuber_kit-1.3.0 lib/kuber_kit/ui/debug.rb
kuber_kit-1.1.4 lib/kuber_kit/ui/debug.rb
kuber_kit-1.2.7 lib/kuber_kit/ui/debug.rb
kuber_kit-1.2.6 lib/kuber_kit/ui/debug.rb
kuber_kit-1.2.5 lib/kuber_kit/ui/debug.rb
kuber_kit-1.2.4 lib/kuber_kit/ui/debug.rb
kuber_kit-1.2.2 lib/kuber_kit/ui/debug.rb
kuber_kit-1.1.2 lib/kuber_kit/ui/debug.rb