lib/jazzy/config.rb in jazzy-0.11.2 vs lib/jazzy/config.rb in jazzy-0.12.0
- old
+ new
@@ -100,10 +100,18 @@
def expand_path(path)
abs_path = expand_glob_path(path)
Pathname(Dir[abs_path][0] || abs_path) # Use existing filesystem spelling
end
+ def hide_swift?
+ hide_declarations == 'swift'
+ end
+
+ def hide_objc?
+ hide_declarations == 'objc'
+ end
+
# ──────── Build ────────
# rubocop:disable Layout/AlignParameters
config_attr :output,
@@ -141,13 +149,13 @@
config_attr :hide_declarations,
command_line: '--hide-declarations [objc|swift] ',
description: 'Hide declarations in the specified language. Given that ' \
'generating Swift docs only generates Swift declarations, ' \
- 'this is only really useful to display just the Swift ' \
- 'declarations & names when generating docs for an ' \
- 'Objective-C framework.',
+ 'this is useful for hiding a specific interface for ' \
+ 'either Objective-C or mixed Objective-C and Swift ' \
+ 'projects.',
default: ''
config_attr :config_file,
command_line: '--config PATH',
description: ['Configuration file (.yaml or .json)',
@@ -163,12 +171,13 @@
alias_config_attr :xcodebuild_arguments, :build_tool_arguments,
command_line: ['-x', '--xcodebuild-arguments arg1,arg2,…argN', Array],
description: 'Back-compatibility alias for build_tool_arguments.'
config_attr :sourcekitten_sourcefile,
- command_line: ['-s', '--sourcekitten-sourcefile FILEPATH'],
- description: 'File generated from sourcekitten output to parse',
- parse: ->(s) { expand_path(s) }
+ command_line: ['-s', '--sourcekitten-sourcefile filepath1,…filepathN',
+ Array],
+ description: 'File(s) generated from sourcekitten output to parse',
+ parse: ->(paths) { paths.map { |path| expand_path(path) } }
config_attr :source_directory,
command_line: '--source-directory DIRPATH',
description: 'The directory that contains the source to be documented',
default: Pathname.pwd,