aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/new
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-05-28 22:04:13 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-09-25 21:31:35 +0200
commit6813edc7d926965e5644cd8befaf229a35b9d8ca (patch)
tree05732c004c68475cb6bd5794d87e030096d4d75c /railties/lib/rails/commands/new
parentb724dbbb8b337d84a3ca8380c9dd75d79a44badf (diff)
downloadrails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.gz
rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.bz2
rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.zip
Initial command structure.
Diffstat (limited to 'railties/lib/rails/commands/new')
-rw-r--r--railties/lib/rails/commands/new/new_command.rb15
1 files changed, 15 insertions, 0 deletions
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