Class: Compath::Finder
- Inherits:
-
Object
- Object
- Compath::Finder
- Defined in:
- lib/compath/finder.rb
Instance Method Summary collapse
Instance Method Details
#files ⇒ Object
3 4 5 6 7 8 |
# File 'lib/compath/finder.rb', line 3 def files @files ||= begin files = `git ls-files -z`.split("\x0") files.map {|file| Pathname.new(file) } end end |
#paths ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/compath/finder.rb', line 10 def paths files.each_with_object({}) do |file, hash| file.descend do |pathname| hash[pathname.to_path] = true end end end |