class GitCompound::Component::Version::Branch

Component version indicated by branch (head of branch)

Public Class Methods

new(repository, branch) click to toggle source
# File lib/git_compound/component/version/branch.rb, line 7
def initialize(repository, branch)
  @repository = repository
  @branch     = branch
end

Public Instance Methods

reachable?() click to toggle source
# File lib/git_compound/component/version/branch.rb, line 20
def reachable?
  @repository.branches.key?(@branch)
end
ref() click to toggle source
# File lib/git_compound/component/version/branch.rb, line 12
def ref
  @branch
end
sha() click to toggle source
# File lib/git_compound/component/version/branch.rb, line 16
def sha
  @repository.branches[@branch]
end
to_s() click to toggle source
# File lib/git_compound/component/version/branch.rb, line 24
def to_s
  "branch: #{@branch}"
end