Ref #25.
Unified · Split
| @@ -102,11 +102,10 @@ class DocsCLI < Thor · 101 unmodified lines | |||
| 102 | handle_doc_not_found_error(error) | 102 | handle_doc_not_found_error(error) |
| 103 | end | 103 | end |
| 104 | 104 | ||
| 105 | desc 'package (<doc> <doc@version>... | --all)', 'Package documentations' | 105 | desc 'package <doc> <doc@version>...', 'Package documentations' |
| 106 | option :all, type: :boolean | ||
| 107 | def package(*names) | 106 | def package(*names) |
| 108 | require 'unix_utils' | 107 | require 'unix_utils' |
| 109 | docs = options[:all] ? Docs.all : find_docs(names) | 108 | docs = find_docs(names) |
| 110 | assert_docs(docs) | 109 | assert_docs(docs) |
| 111 | docs.each(&method(:package_doc)) | 110 | docs.each(&method(:package_doc)) |
| 112 | puts 'Done' | 111 | puts 'Done' |