Sha256: ca74c3515a42f62b7c5f529a5f8f25a02aac812454a359d22324b223ab502177
Contents?: true
Size: 510 Bytes
Versions: 9
Compression:
Stored size: 510 Bytes
Contents
require_relative "base" module Rfix class Branch::Reference < Branch::Base attr_reader :reference def initialize(reference) @reference = reference end def resolve(with:) Branch::Name.new(reference).resolve(with: with) rescue Branch::UnknownBranchError revparse(using: with, ref: reference) rescue Rugged::InvalidError raise Branch::UnknownBranchError.new("Branch with reference {{error:#{reference}}} not found") end alias to_s reference end end
Version data entries
9 entries across 9 versions & 1 rubygems