lib/pdd/sources.rb in pdd-0.21.2 vs lib/pdd/sources.rb in pdd-0.21.3

- old
+ new

@@ -54,21 +54,21 @@ VerboseSource.new(path, Source.new(file, path)) end end def exclude(paths) - paths = paths.nil? ? [] : paths - paths = paths.is_a?(Array) ? paths : [paths] + paths = [] if paths.nil? + paths = [paths] unless paths.is_a?(Array) @exclude.push(*paths) paths&.each do |path| PDD.log.info "#{Rainbow('Excluding').orange} #{path}" end self end def include(paths) - paths = paths.nil? ? [] : paths - paths = paths.is_a?(Array) ? paths : [paths] + paths = [] if paths.nil? + paths = [paths] unless paths.is_a?(Array) @include.push(*paths) paths&.each do |path| PDD.log.info "#{Rainbow('Including').blue} #{path}" end self