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 /ext | |
| parent | a4a7e23038e26ecc63d94b5e815c36dff2ffb433 (diff) | |
| download | ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.tar.gz ruby2d-1b646f82c67e7c38df08113bcc3323c7aaf4639f.zip | |
Move `String#colorize` to a separate file to require
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/ruby2d/extconf.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/ruby2d/extconf.rb b/ext/ruby2d/extconf.rb index d3ddac0..3cd2302 100644 --- a/ext/ruby2d/extconf.rb +++ b/ext/ruby2d/extconf.rb @@ -1,17 +1,12 @@ require 'mkmf' +require_relative '../../lib/ruby2d/colorize' S2D_VERSION = '1.0.1' # Simple 2D minimum version required $errors = [] -class String - def colorize(c); "\e[#{c}m#{self}\e[0m" end - def bold; colorize('1') end - def red; colorize('1;31') end -end - def print_errors puts " -#{"== #{"Ruby 2D Installation Errors".red} =======================================\n"} +#{"== #{"Ruby 2D Installation Errors".error} =======================================\n"} #{$errors.join("\n ")}\n #{"======================================================================="}" end |
