static public Method

Base.new(runtime_args, runtime_options = {})

There's no documentation for this item.

Source Code

# File rails_generator/base.rb, line 100
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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.