class QB::Repo

@todo document QB::Repo class.

Public Class Methods

from_path(path, git: {}) click to toggle source

Get an instance for whatever repo `path` is in.

@param [String, Pathname] path

A path that may be in a repo.

@return [nil]

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

@return [QB::Repo]

If `path` *is* not a part of repo we can recognize.
# File lib/qb/repo.rb, line 49
def self.from_path path, git: {}
  QB::Repo::Git.from_path path, **git
end
from_path!(path, **opts) click to toggle source

Instantiate a {QB::Repo} for the repo `path` is in or raise if it's not in any single recognizable repo.

@param path see .from_path @param **opts see .from_path

@return [QB::Repo]

@raise [QB::FSStateError]

If `path` is not in a repo.
# File lib/qb/repo.rb, line 65
def self.from_path! path, **opts
  from_path( path, **opts ).tap { |repo|
    if repo.nil?
      raise QB::FSStateError,
            "Path #{ path.inspect } does not appear to be in a repo."
    end
  }
end

Public Instance Methods

tags() click to toggle source

@todo Document tags method.

@param [type] arg_name

@todo Add name param description.

@return [Array<String>]

# File lib/qb/repo.rb, line 122
def tags
  raise NotImplementedError
end