From 6813edc7d926965e5644cd8befaf229a35b9d8ca Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sat, 28 May 2016 22:04:13 +0200 Subject: Initial command structure. --- railties/lib/rails/commands/new/new_command.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 railties/lib/rails/commands/new/new_command.rb (limited to 'railties/lib/rails/commands/new') diff --git a/railties/lib/rails/commands/new/new_command.rb b/railties/lib/rails/commands/new/new_command.rb new file mode 100644 index 0000000000..13eedfc479 --- /dev/null +++ b/railties/lib/rails/commands/new/new_command.rb @@ -0,0 +1,15 @@ +module Rails + module Command + class NewCommand < Base + def help + Rails::Command.invoke :application, [ "--help" ] + end + + def perform(*) + puts "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n" + puts "Type 'rails' for help." + exit 1 + end + end + end +end -- cgit v1.2.3