class method
self.new
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
self.new(runtime_args, runtime_options = {})
No documentation comment.
Parameters
-
runtime_argsreq -
runtime_optionsopt = {}
Source
# File railties/lib/rails_generator/base.rb, line 101
def initialize(runtime_args, runtime_options = {})
@args = runtime_args
parse!(@args, runtime_options)
# Derive source and destination paths.
@source_root = options[:source] || File.join(spec.path, 'templates')
if options[:destination]
@destination_root = options[:destination]
elsif defined? ::RAILS_ROOT
@destination_root = ::RAILS_ROOT
end
# Silence the logger if requested.
logger.quiet = options[:quiet]
# Raise usage error if help is requested.
usage if options[:help]
end
Defined in railties/lib/rails_generator/base.rb line 101
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generator::Base