Class: Changit::GitDirFinder
- Inherits:
-
Object
- Object
- Changit::GitDirFinder
- Defined in:
- lib/changit/git_dir_finder.rb
Constant Summary collapse
- DEFAULT_SEARCH_PATH =
Dir.pwd.freeze
Instance Method Summary collapse
- #find_all ⇒ Object
-
#initialize(search_path: DEFAULT_SEARCH_PATH) ⇒ GitDirFinder
constructor
A new instance of GitDirFinder.
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_all ⇒ Object
11 12 13 |
# File 'lib/changit/git_dir_finder.rb', line 11 def find_all Dir.glob(@search_path) end |