Sha256: 7c45c40a0564c3bb9ea3b882bbe2eaa65a37efc6f383d4176c3d5ae0456bb584
Contents?: true
Size: 736 Bytes
Versions: 8
Compression:
Stored size: 736 Bytes
Contents
module Mutest # Class to colorize strings class Color include Adamantium::Flat, Concord.new(:code) # Format text with color # # @param [String] text # # @return [String] def format(text) "\e[#{code}m#{text}\e[0m" end NONE = Class.new(self) do # Format null color # # @param [String] text # # @return [String] # the argument string def format(text) text end private # rubocop:disable AccessModifierIndentation # Initialize null color # # @return [undefined] def initialize end end.new RED = Color.new(31) GREEN = Color.new(32) BLUE = Color.new(34) end # Color end # Mutest
Version data entries
8 entries across 8 versions & 1 rubygems