Class: Changit::GitDirFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/changit/git_dir_finder.rb

Constant Summary collapse

DEFAULT_SEARCH_PATH =
Dir.pwd.freeze

Instance Method Summary collapse

Constructor Details

#initialize(search_path: DEFAULT_SEARCH_PATH) ⇒ GitDirFinder

Returns a new instance of GitDirFinder.



5
6
7
8
9
# File 'lib/changit/git_dir_finder.rb', line 5

def initialize(search_path: DEFAULT_SEARCH_PATH)
  @search_path = "#{search_path}/**/.git/config"

  freeze
end

Instance Method Details

#find_allObject



11
12
13
# File 'lib/changit/git_dir_finder.rb', line 11

def find_all
  Dir.glob(@search_path)
end