class Rails::Command::PluginCommand

:nodoc:

def self.banner(*) # :nodoc:

:nodoc:
def self.banner(*) # :nodoc:
  "#{executable} new [options]"
end

def help

def help
  run_plugin_generator %w( --help )
end

def perform(type = nil, *plugin_args)

def perform(type = nil, *plugin_args)
  plugin_args << "--help" unless type == "new"
  unless options.key?("no_rc") # Thor's not so indifferent access hash.
    railsrc = File.expand_path(options[:rc])
    if File.exist?(railsrc)
      extra_args = File.read(railsrc).split(/\n+/).flat_map(&:split)
      say "Using #{extra_args.join(" ")} from #{railsrc}"
      plugin_args.insert(1, *extra_args)
    end
  end
  run_plugin_generator plugin_args
end

def run_plugin_generator(plugin_args)

def run_plugin_generator(plugin_args)
  require "rails/generators"
  require "rails/generators/rails/plugin/plugin_generator"
  Rails::Generators::PluginGenerator.start plugin_args
end