diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index 0ecd7bdb..786d9ef6 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -267,17 +267,19 @@ class DocsCLI < Thor private - def find_docs(names) - names.flat_map do |name| - name, version = name.split(/@|~/) - if version == 'all' - Docs.find(name, false).versions - else - Docs.find(name, version) - end + def find_doc(name) + name, version = name.split(/@|~/) + if version == 'all' + Docs.find(name, false).versions + else + Docs.find(name, version) end end + def find_docs(names) + names.flat_map {|name| find_doc(name)} + end + def find_docs_by_slugs(slugs) slugs.flat_map do |slug| slug, version = slug.split(/~/)