summaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-10-16 23:24:18 -0700
committerTom Black <[email protected]>2018-10-16 23:24:18 -0700
commit1b646f82c67e7c38df08113bcc3323c7aaf4639f (patch)
treed932a3d054ceba5ce5be69e42453998787cf4d9f /bin
parenta4a7e23038e26ecc63d94b5e815c36dff2ffb433 (diff)
downloadruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.tar.gz
ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.zip
Move `String#colorize` to a separate file to require
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ruby2d9
1 files changed, 1 insertions, 8 deletions
diff --git a/bin/ruby2d b/bin/ruby2d
index 9fe9714..9a819d9 100755
--- a/bin/ruby2d
+++ b/bin/ruby2d
@@ -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}"