Method: FileIndexing::IndexerPatterns#initialize
- Defined in:
- lib/file_indexing/indexer_patterns.rb
#initialize(indexer_patterns = nil) ⇒ IndexerPatterns
Returns a new instance of IndexerPatterns.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/file_indexing/indexer_patterns.rb', line 10 def initialize (indexer_patterns = nil) Log.debug1 "Initialize index patterns #{indexer_patterns}." @positive_patterns = Array.new @negative_patterns = Array.new # TODO add a test (including empty collections) if indexer_patterns indexer_patterns.positive_patterns.each do |pattern| add_pattern(pattern) end indexer_patterns.negative_patterns.each do |pattern| add_pattern(pattern, false) end end end |