Class: CommandT::Finder::FileFinder
Instance Method Summary
collapse
#open_selection, #path=, #sorted_matches_for
Constructor Details
#initialize(path = Dir.pwd, options = {}) ⇒ FileFinder
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/command-t/finder/file_finder.rb', line 7
def initialize(path = Dir.pwd, options = {})
case options.delete(:scanner)
when 'ruby', nil
@scanner = Scanner::FileScanner::RubyFileScanner.new(path, options)
when 'find'
@scanner = Scanner::FileScanner::FindFileScanner.new(path, options)
when 'watchman'
@scanner = Scanner::FileScanner::WatchmanFileScanner.new(path, options)
when 'git'
@scanner = Scanner::FileScanner::GitFileScanner.new(path, options)
else
raise ArgumentError, "unknown scanner type '#{options[:scanner]}'"
end
@matcher = Matcher.new @scanner, options
end
|
Instance Method Details
#flush ⇒ Object
24
25
26
|
# File 'lib/command-t/finder/file_finder.rb', line 24
def flush
@scanner.flush
end
|
#name ⇒ Object
28
29
30
|
# File 'lib/command-t/finder/file_finder.rb', line 28
def name
'Files'
end
|