Sha256: 8576b60ac437a6a2eecfff4403f6801cc4efdd0cc76614f3b61d76ff482b81dc
Contents?: true
Size: 836 Bytes
Versions: 19
Compression:
Stored size: 836 Bytes
Contents
# frozen_string_literal: true module Karafka module Helpers # Simple wrapper for adding colors to strings module Colorize # @param string [String] string we want to have in green # @return [String] green string def green(string) "\033[0;32m#{string}\033[0m" end # @param string [String] string we want to have in red # @return [String] red string def red(string) "\033[0;31m#{string}\033[0m" end # @param string [String] string we want to have in yellow # @return [String] yellow string def yellow(string) "\033[1;33m#{string}\033[0m" end # @param string [String] string we want to have in grey # @return [String] grey string def grey(string) "\e[38;5;244m#{string}\e[0m" end end end end
Version data entries
19 entries across 19 versions & 1 rubygems