Method: QB::Repo.from_path

Defined in:
lib/qb/repo.rb

.from_path(path, git: {}) ⇒ nil, QB::Repo

Get an instance for whatever repo path is in.

Parameters:

  • path (String, Pathname)

    A path that may be in a repo.

Returns:

  • (nil)

    If path is not a part of repo we can recognize (git only at the moment, sorry).

  • (QB::Repo)

    If path is not a part of repo we can recognize.



49
50
51
# File 'lib/qb/repo.rb', line 49

def self.from_path path, git: {}
  QB::Repo::Git.from_path path, **git
end