class method self.new

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.new(runtime_args, runtime_options = {})

No documentation comment.

Parameters

runtime_args req
runtime_options opt = {}
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close