Sha256: 06a70bce6313d6c1ed47258348a38c3f6d6d40d5c4e7525c101417dd27744a1b
Contents?: true
Size: 241 Bytes
Versions: 11
Compression:
Stored size: 241 Bytes
Contents
class String def colorize(pattern) self.split(/(#{pattern})/).map{|term| if term =~ /#{pattern}/ term = Rainbow(term).color(Tw::App::Render.color_code term).bright.underline end term }.join('') end end
Version data entries
11 entries across 11 versions & 1 rubygems