diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-02 15:55:21 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-02 15:55:21 +0200 |
commit | 528d555e378e9900ffda40c8ff3627e0609a048c (patch) | |
tree | 4f00ff742efbbe1fd732cdea57c9556467fc817d /railties/lib/generators/base.rb | |
parent | a08a8cd8d24dd1a8342e0fd133c5e8ed09e1f56d (diff) | |
download | rails-528d555e378e9900ffda40c8ff3627e0609a048c.tar.gz rails-528d555e378e9900ffda40c8ff3627e0609a048c.tar.bz2 rails-528d555e378e9900ffda40c8ff3627e0609a048c.zip |
Make invoke output white and use padding.
Diffstat (limited to 'railties/lib/generators/base.rb')
-rw-r--r-- | railties/lib/generators/base.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/generators/base.rb b/railties/lib/generators/base.rb index aeb79dd339..4b47ebc49b 100644 --- a/railties/lib/generators/base.rb +++ b/railties/lib/generators/base.rb @@ -118,7 +118,7 @@ module Rails def self.hook_for(*names, &block) options = names.extract_options! as = options.fetch(:as, generator_name) - verbose = options.fetch(:verbose, :blue) + verbose = options.fetch(:verbose, :white) names.each do |name| default = { :desc => "#{name.to_s.humanize} to be invoked", :banner => "NAME" } @@ -196,7 +196,7 @@ module Rails def self.invoke_if(*names, &block) options = names.extract_options!.merge(:type => :boolean) as = options.fetch(:as, generator_name) - verbose = options.fetch(:verbose, :blue) + verbose = options.fetch(:verbose, :white) names.each do |name| class_option name, options @@ -267,11 +267,13 @@ module Rails # in case the user wants to customize how the class is invoked. # def invoke_class_with_block(name, klass) #:nodoc: + shell.padding += 1 if block = self.class.invocation_blocks[name] block.call(self, klass) else invoke klass end + shell.padding -= 1 end # Check whether the given class names are already taken by user |