lib/jazzy/config.rb in jazzy-0.0.19 vs lib/jazzy/config.rb in jazzy-0.0.20
- old
+ new
@@ -20,10 +20,11 @@
attr_accessor :readme_path
attr_accessor :docset_platform
attr_accessor :root_url
attr_accessor :version
attr_accessor :min_acl
+ attr_accessor :skip_undocumented
def initialize
self.output = Pathname('docs')
self.xcodebuild_arguments = []
self.author_name = ''
@@ -31,10 +32,11 @@
self.author_url = URI('')
self.clean = false
self.docset_platform = 'jazzy'
self.version = '1.0'
self.min_acl = SourceDeclaration::AccessControlLevel.internal
+ self.skip_undocumented = false
end
# rubocop:disable Metrics/MethodLength
def self.parse!
config = new
@@ -117,9 +119,16 @@
if acl == 'private'
config.min_acl = SourceDeclaration::AccessControlLevel.private
elsif acl == 'public'
config.min_acl = SourceDeclaration::AccessControlLevel.public
end
+ end
+
+ opt.on('--[no-]skip-undocumented',
+ "Don't document declarations that have no documentation \
+ comments.",
+ ) do |skip_undocumented|
+ config.skip_undocumented = skip_undocumented
end
opt.on('-v', '--version', 'Print version number') do
puts 'jazzy version: ' + Jazzy::VERSION
exit