instance method
add_options!
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
add_options!(opt)
No documentation comment.
Parameters
-
optreq
Source
# File railties/lib/rails_generator/generators/applications/app/app_generator.rb, line 119
def add_options!(opt)
opt.separator ''
opt.separator 'Options:'
opt.on("-r", "--ruby=path", String,
"Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
"Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v }
opt.on("-d", "--database=name", String,
"Preconfigure for selected database (options: #{DATABASES.join('/')}).",
"Default: #{DEFAULT_DATABASE}") { |v| options[:db] = v }
opt.on("-f", "--freeze",
"Freeze Rails in vendor/rails from the gems generating the skeleton",
"Default: false") { |v| options[:freeze] = v }
end
Defined in railties/lib/rails_generator/generators/applications/app/app_generator.rb line 119
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AppGenerator