Sha256: b325d1a798fd47a3dbe41b24e22b28bbcf4ef9b146da6690effe2f7d919771b1
Contents?: true
Size: 810 Bytes
Versions: 44
Compression:
Stored size: 810 Bytes
Contents
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. module Ramaze module CoreExtensions # Extensions for String module String { :reset => 0, :bold => 1, :dark => 2, :underline => 4, :blink => 5, :negative => 7, :black => 30, :red => 31, :green => 32, :yellow => 33, :blue => 34, :magenta => 35, :cyan => 36, :white => 37, }.each do |key, value| define_method key do "\e[#{value}m" + self + "\e[0m" end end end end end
Version data entries
44 entries across 44 versions & 5 rubygems