Sha256: 26abcd17b017d1a1c03f14b92243eaa792d230d6c74f804836d52b0366c87d4d
Contents?: true
Size: 418 Bytes
Versions: 24
Compression:
Stored size: 418 Bytes
Contents
# frozen_string_literal: true module StimulusReflex module Utils module Colorize COLORS = { red: "31", green: "32", yellow: "33", blue: "34", magenta: "35", cyan: "36", white: "37" } refine String do COLORS.each do |name, code| define_method(name) { "\e[#{code}m#{self}\e[0m" } end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems