Class: UnitF::Tag::FileSet
- Inherits:
-
Array
- Object
- Array
- UnitF::Tag::FileSet
- Includes:
- Helpers
- Defined in:
- lib/unitf/tag/fileset.rb
Instance Method Summary collapse
- #find_files(root_path) ⇒ Object
-
#initialize(targets) ⇒ FileSet
constructor
A new instance of FileSet.
- #process_target(target) ⇒ Object
Methods included from Helpers
Constructor Details
#initialize(targets) ⇒ FileSet
Returns a new instance of FileSet.
6 7 8 9 10 11 |
# File 'lib/unitf/tag/fileset.rb', line 6 def initialize(targets) targets = [targets] if targets.is_a?(String) targets.each do |target| process_target(target) end end |
Instance Method Details
#find_files(root_path) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/unitf/tag/fileset.rb', line 22 def find_files(root_path) Find.find(root_path) do |file_path| UnitF::Log.debug("Considering #{file_path}") next unless valid_file?(file_path) UnitF::Log.debug("Including #{file_path}") append(UnitF::Tag::File.new(file_path)) end end |