aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails_generator/options.rb')
-rw-r--r--railties/lib/rails_generator/options.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/railties/lib/rails_generator/options.rb b/railties/lib/rails_generator/options.rb
index 287605c852..4374249314 100644
--- a/railties/lib/rails_generator/options.rb
+++ b/railties/lib/rails_generator/options.rb
@@ -2,10 +2,6 @@ require 'optparse'
module Rails
module Generator
- # Implement add_options! to add your options to the parser:
- # def add_options!(opt)
- # opt.on('-v', '--verbose') { |value| options[:verbose] = value }
- # end
module Options
def self.append_features(base)
super
@@ -88,7 +84,7 @@ module Rails
@option_parser = OptionParser.new do |opt|
opt.banner = banner
- add_options!(opt) if respond_to?(:add_options!)
+ add_options!(opt)
add_general_options!(opt)
opt.parse!(args)
end
@@ -113,6 +109,13 @@ module Rails
"Usage: #{$0} [options]"
end
+ # Override to add your options to the parser:
+ # def add_options!(opt)
+ # opt.on('-v', '--verbose') { |value| options[:verbose] = value }
+ # end
+ def add_options!(opt)
+ end
+
# Adds general options like -h and --quiet. Usually don't override.
def add_general_options!(opt)
opt.separator ''