Class: Spellr::FileList
- Inherits:
-
Object
- Object
- Spellr::FileList
- Includes:
- Enumerable
- Defined in:
- lib/spellr/file_list.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(patterns = nil) ⇒ FileList
constructor
A new instance of FileList.
- #to_a ⇒ Object
Constructor Details
#initialize(patterns = nil) ⇒ FileList
Returns a new instance of FileList.
11 12 13 |
# File 'lib/spellr/file_list.rb', line 11 def initialize(patterns = nil) @patterns = patterns end |
Instance Method Details
#each ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/spellr/file_list.rb', line 15 def each return enum_for(:each) unless block_given? fast_ignore.each do |file| yield(Spellr::File.new(file)) end end |
#to_a ⇒ Object
23 24 25 |
# File 'lib/spellr/file_list.rb', line 23 def to_a enum_for(:each).to_a end |