Class: Rubygrep::FileSearcher

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygrep/file_searcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ FileSearcher

Returns a new instance of FileSearcher.



5
6
7
8
# File 'lib/rubygrep/file_searcher.rb', line 5

def initialize(options = {})
  @options = options
  @found_file_names = []
end

Instance Attribute Details

#found_file_namesObject

Returns the value of attribute found_file_names.



3
4
5
# File 'lib/rubygrep/file_searcher.rb', line 3

def found_file_names
  @found_file_names
end

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/rubygrep/file_searcher.rb', line 3

def options
  @options
end

Instance Method Details

#search(file_names) ⇒ Object



10
11
12
13
# File 'lib/rubygrep/file_searcher.rb', line 10

def search(file_names)
  search_with_options(file_names)
  found_file_names
end