Class: SubSetter::Fast::Dir
- Inherits:
-
Object
- Object
- SubSetter::Fast::Dir
- Defined in:
- lib/sub-setter/fast/dir.rb
Overview
Specific subsetter for Dir entries. Should inherit or invoke the SubSetter::Array Just a stub for the moment
Instance Method Summary collapse
- #ending(the_ending) ⇒ Object
- #extension(the_extension) ⇒ Object
-
#initialize(set) ⇒ Dir
constructor
A new instance of Dir.
- #match(regexp) ⇒ Object
- #strip_extension ⇒ Object
Constructor Details
#initialize(set) ⇒ Dir
Returns a new instance of Dir.
6 7 8 |
# File 'lib/sub-setter/fast/dir.rb', line 6 def initialize set @set = set end |
Instance Method Details
#ending(the_ending) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/sub-setter/fast/dir.rb', line 18 def ending the_ending return_me = ::Fast::Dir.new @set.each do |entry| return_me << entry if entry.end_with? the_ending end return_me end |
#extension(the_extension) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/sub-setter/fast/dir.rb', line 10 def extension the_extension return_me = ::Fast::Dir.new @set.each do |entry| return_me << entry if entry.end_with? the_extension end return_me end |