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