aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-12-05 21:28:59 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2015-12-05 21:28:59 +0100
commit290866cb934ecddb377e2aef3873e8e930647802 (patch)
tree703829ae49db935b511acd7100535d9f19c185b1 /railties/lib
parent0d8b3c2e7fba5f1d35c3cbc09797311a0be1b480 (diff)
downloadrails-290866cb934ecddb377e2aef3873e8e930647802.tar.gz
rails-290866cb934ecddb377e2aef3873e8e930647802.tar.bz2
rails-290866cb934ecddb377e2aef3873e8e930647802.zip
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.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/commands/command.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/commands/command.rb b/railties/lib/rails/commands/command.rb
index ffd1a50c79..2e99046e9a 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