1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/commands/new/new_command.rb

20 lines
456 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-05-28 16:04:13 -04:00
module Rails
module Command
class NewCommand < Base # :nodoc:
no_commands do
def help
Rails::Command.invoke :application, [ "--help" ]
end
2016-05-28 16:04:13 -04:00
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."
2016-05-28 16:04:13 -04:00
exit 1
end
end
end
end