Sha256: 8b41fd2e2814ff3c4b5d51231c8f831154d4f436d084230e1f206e1e6fbf6ae3
Contents?: true
Size: 308 Bytes
Versions: 2
Compression:
Stored size: 308 Bytes
Contents
module Docli module Utils class << self COLORIZE_MAPPING = { green: %w{active}, red: %w{} } def colorize(text) color = COLORIZE_MAPPING.find { |color, values| values.include?(text) } color ? text.method(color[0]).call : text end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
docli-0.0.2.pre.alpha.pre.15 | lib/docli/utils.rb |
docli-0.0.2.pre.alpha.pre.12 | lib/docli/utils.rb |