Class: FileSetWorks::FilesetItem
- Inherits:
-
Object
- Object
- FileSetWorks::FilesetItem
- Defined in:
- lib/fileset.rb
Instance Method Summary collapse
- #create_in(search_path) ⇒ Object
- #default_populator ⇒ Object
-
#initialize(path, populator = default_populator()) ⇒ FilesetItem
constructor
A new instance of FilesetItem.
- #populate(search_paths) ⇒ Object
Constructor Details
#initialize(path, populator = default_populator()) ⇒ FilesetItem
Returns a new instance of FilesetItem.
84 85 86 87 |
# File 'lib/fileset.rb', line 84 def initialize(path, populator = default_populator()) @path = path @populator = populator end |
Instance Method Details
#create_in(search_path) ⇒ Object
97 98 99 100 101 |
# File 'lib/fileset.rb', line 97 def create_in(search_path) path = ::File::join(search_path, @path) return if ::File::exists?(path) init_self(path) end |
#default_populator ⇒ Object
89 90 91 |
# File 'lib/fileset.rb', line 89 def default_populator Population::LowestPath end |
#populate(search_paths) ⇒ Object
93 94 95 |
# File 'lib/fileset.rb', line 93 def populate(search_paths) @populator.new(self, search_paths).populate end |