diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-02 15:57:37 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-02 15:57:37 +0200 |
commit | b7bc68076c50714977aa7e990273a2ec92ba2e15 (patch) | |
tree | 4e16cb0ac0d999d7ec8779b2858aaa7ff82c85c1 /railties/lib | |
parent | 528d555e378e9900ffda40c8ff3627e0609a048c (diff) | |
download | rails-b7bc68076c50714977aa7e990273a2ec92ba2e15.tar.gz rails-b7bc68076c50714977aa7e990273a2ec92ba2e15.tar.bz2 rails-b7bc68076c50714977aa7e990273a2ec92ba2e15.zip |
Make color optional.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generators.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |