aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/commands/new/new_command.rb
blob: a4f20815103d3d4ed30948c67041661356d04955 (plain) (tree)
1
2
3
4
5
6
7
8
9

                             

                
                                     



                                                          


                    

                                                                                                                                       




              
# frozen_string_literal: true

module Rails
  module Command
    class NewCommand < Base # :nodoc:
      no_commands do
        def help
          Rails::Command.invoke :application, [ "--help" ]
        end
      end

      def perform(*)
        say "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n"
        say "Type 'rails' for help."
        exit 1
      end
    end
  end
end