提交 290866cb 编写于 作者: K Kasper Timm Hansen

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.
上级 0d8b3c2e
......@@ -27,10 +27,6 @@ def self.options_for(command_name, &options_to_parse)
@@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 @@ def self.inherited(command)
@@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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册