module FileCrawler::Finder::Command::Collect

Attributes

regexs[RW]

Public Instance Methods

collect(options={}) click to toggle source
# File lib/file_crawler/finder/command/collect.rb, line 34
def collect(options={})
  tap {
    if options[:regexs].is_a?(Array)
      options[:regexs].each {|o|
        regexs << FileCrawler::Regex.new(o[0], o[1]) if o.size == 2
      }
    end

    @collections = Organizer.new.run(@directories, regexs)
  }
end