mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Make color optional.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user