class GitCompound::Component::Version::VersionStrategy
Abstraction for component versions like
gem version, sha and branch
Public Class Methods
new()
click to toggle source
# File lib/git_compound/component/version/version_strategy.rb, line 8 def initialize raise NotImplementedError end
Public Instance Methods
==(other)
click to toggle source
# File lib/git_compound/component/version/version_strategy.rb, line 39 def ==(other) sha == other.sha end
reachable?()
click to toggle source
Should return true if this reference in source repository
is reachable
# File lib/git_compound/component/version/version_strategy.rb, line 29 def reachable? raise NotImplementedError end
ref()
click to toggle source
Should return git reference (ex branch, tag or sha) This should not raise exception if unreachable
# File lib/git_compound/component/version/version_strategy.rb, line 15 def ref raise NotImplementedError end
sha()
click to toggle source
Should return sha for specified reference
(ex tagged commit sha or head of specified branch)
# File lib/git_compound/component/version/version_strategy.rb, line 22 def sha raise NotImplementedError end
to_s()
click to toggle source
String
representation of this version strategy
# File lib/git_compound/component/version/version_strategy.rb, line 35 def to_s raise NotImplementedError end