Class: Dir
- Inherits:
-
Object
- Object
- Dir
- Defined in:
- lib/taglob/extensions/dir.rb
Class Method Summary collapse
- .tag_and(pattern, *tags) ⇒ Object
- .tag_or(pattern, *tags) ⇒ Object
- .taglob(pattern, tags) ⇒ Object
- .tags(pattern) ⇒ Object
Class Method Details
.tag_and(pattern, *tags) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/taglob/extensions/dir.rb', line 18 def self.tag_and(pattern, *) tagged_files = [] self.(pattern).each do |file,| tagged_files << file if ( - ).empty? end tagged_files end |
.tag_or(pattern, *tags) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/taglob/extensions/dir.rb', line 26 def self.tag_or(pattern, *) tagged_files = [] self.(pattern).each do |file,| tagged_files << file if !( & ).empty? end tagged_files end |