From b7bc68076c50714977aa7e990273a2ec92ba2e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 2 Jul 2009 15:57:37 +0200 Subject: Make color optional. --- railties/lib/generators.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties') diff --git a/railties/lib/generators.rb b/railties/lib/generators.rb index 8814f6e800..c97801dea8 100644 --- a/railties/lib/generators.rb +++ b/railties/lib/generators.rb @@ -15,12 +15,20 @@ require 'generators/named_base' module Rails module Generators + # Remove builtin generators. + # def self.builtin Dir[File.dirname(__FILE__) + '/generators/*/*'].collect do |file| file.split('/')[-2, 2] end end + # Remove the color from output. + # + def self.no_color! + Thor::Base.shell = Thor::Shell::Basic + end + # Receives a namespace and tries different combinations to find a generator. # # ==== Examples -- cgit v1.2.3