diff options
| author | Tom Black <[email protected]> | 2018-10-16 23:24:18 -0700 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2018-10-16 23:24:18 -0700 |
| commit | 1b646f82c67e7c38df08113bcc3323c7aaf4639f (patch) | |
| tree | d932a3d054ceba5ce5be69e42453998787cf4d9f /bin | |
| parent | a4a7e23038e26ecc63d94b5e815c36dff2ffb433 (diff) | |
| download | ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.tar.gz ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.zip | |
Move `String#colorize` to a separate file to require
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/ruby2d | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -1,15 +1,8 @@ #!/usr/bin/env ruby +require 'ruby2d/colorize' require 'ruby2d/version' require 'fileutils' -# Extending `String` to include some fancy colors -class String - def colorize(c); "\e[#{c}m#{self}\e[0m" end - def bold; colorize('1') end - def warn; colorize('1;33') end - def error; colorize('1;31') end -end - # The installed gem directory @gem_dir = "#{Gem::Specification.find_by_name('ruby2d').gem_dir}" |
