Class: Spellr::FileList

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/spellr/file_list.rb

Instance Method Summary collapse

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

#eachObject



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_aObject



23
24
25
# File 'lib/spellr/file_list.rb', line 23

def to_a
  enum_for(:each).to_a
end