Skip to content

Commit

Permalink
[Config] s/excluded/excluded_files/
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed May 1, 2015
1 parent 04bbf59 commit a7eeefd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/jazzy/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Config
attr_accessor :docset_icon
attr_accessor :docset_path
attr_accessor :source_directory
attr_accessor :excluded
attr_accessor :excluded_files

def initialize
PodspecDocumenter.configure(self, Dir['*.podspec{,.json}'].first)
Expand All @@ -43,7 +43,7 @@ def initialize
self.min_acl = SourceDeclaration::AccessControlLevel.public
self.skip_undocumented = false
self.source_directory = Pathname.pwd
self.excluded = []
self.excluded_files = []
end

def podspec=(podspec)
Expand Down Expand Up @@ -168,7 +168,7 @@ def self.parse!

opt.on('-e', '--exclude file1,file2,…fileN', Array,
'Files to be excluded from documentation') do |files|
config.excluded = files
config.excluded_files = files
end

opt.on('-v', '--version', 'Print version number') do
Expand Down
5 changes: 3 additions & 2 deletions lib/jazzy/sourcekitten.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,10 @@ def self.deduplicate_declarations(declarations)
end

def self.filter_excluded_files(json)
excluded_files = Config.instance.excluded
excluded_files = Config.instance.excluded_files
json.map do |doc|
doc.values.first unless excluded_files.include?(doc.keys.first)
key = doc.keys.first
doc[key] unless excluded_files.include?(key)
end.compact
end

Expand Down

0 comments on commit a7eeefd

Please sign in to comment.