Class: FileSetWorks::Population::EveryPath
- Inherits:
-
Object
- Object
- FileSetWorks::Population::EveryPath
- Defined in:
- lib/fileset.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(file_rep, search_paths) ⇒ EveryPath
constructor
A new instance of EveryPath.
- #paths ⇒ Object
- #per_path(search_path) ⇒ Object
- #populate ⇒ Object
Constructor Details
#initialize(file_rep, search_paths) ⇒ EveryPath
Returns a new instance of EveryPath.
33 34 35 36 |
# File 'lib/fileset.rb', line 33 def initialize(file_rep, search_paths) @rep = file_rep @search_paths = search_paths end |
Instance Method Details
#paths ⇒ Object
51 52 53 54 55 |
# File 'lib/fileset.rb', line 51 def paths @search_paths.each do |sp| yield sp end end |
#per_path(search_path) ⇒ Object
57 58 59 |
# File 'lib/fileset.rb', line 57 def per_path(search_path) @rep.create_in(search_path) end |
#populate ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/fileset.rb', line 39 def populate catch :done do paths do |sp| begin per_path(sp) rescue SystemCallError next end end end end |