diff --git a/railties/lib/rails/commands/command.rb b/railties/lib/rails/commands/command.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/commands/command.rb
+++ b/railties/lib/rails/commands/command.rb
@@ -27,10 +27,6 @@ module Rails
         @@command_options[command_name] = options_to_parse
       end
 
-      def self.command_name_for(task_name)
-        task_name.gsub(':', '_').to_sym
-      end
-
       def self.set_banner(command_name, banner)
         options_for(command_name) { |opts, _| opts.banner = banner }
       end
@@ -61,6 +57,10 @@ module Rails
           @@commands << command
         end
 
+        def self.command_name_for(task_name)
+          task_name.gsub(':', '_').to_sym
+        end
+
         def command_for(command_name)
           klass = @@commands.find do |command|
             command_instance_methods = command.public_instance_methods
Move `command_name_for` to private section.

Users shouldn't have to lookup the command name for a task. Put it in
the private section, so it doesn't show up in any generated documentation.