Module: FileCrawler::Finder::Command::Collect
- Includes:
- Base
- Included in:
- FileCrawler::Finder
- Defined in:
- lib/file_crawler/finder/command/collect.rb
Defined Under Namespace
Classes: Organizer
Instance Attribute Summary collapse
-
#regexs ⇒ Object
Returns the value of attribute regexs.
Instance Method Summary collapse
Methods included from Base
Instance Attribute Details
#regexs ⇒ Object
Returns the value of attribute regexs.
28 29 30 |
# File 'lib/file_crawler/finder/command/collect.rb', line 28 def regexs @regexs end |
Instance Method Details
#collect(options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/file_crawler/finder/command/collect.rb', line 34 def collect(={}) tap { if [:regexs].is_a?(Array) [:regexs].each {|o| regexs << FileCrawler::Regex.new(o[0], o[1]) if o.size == 2 } end @collections = Organizer.new.run(@files, regexs) } end |