Class: GitCompound::Component::Version::Tag
- Inherits:
-
VersionStrategy
- Object
- VersionStrategy
- GitCompound::Component::Version::Tag
- Defined in:
- lib/git_compound/component/version/tag.rb
Overview
Component version as tag
Instance Method Summary collapse
-
#initialize(repository, tag) ⇒ Tag
constructor
A new instance of Tag.
- #reachable? ⇒ Boolean
- #ref ⇒ Object
- #sha ⇒ Object
- #to_s ⇒ Object
Methods inherited from VersionStrategy
Constructor Details
#initialize(repository, tag) ⇒ Tag
Returns a new instance of Tag.
7 8 9 10 |
# File 'lib/git_compound/component/version/tag.rb', line 7 def initialize(repository, tag) @repository = repository @tag = tag end |
Instance Method Details
#reachable? ⇒ Boolean
20 21 22 |
# File 'lib/git_compound/component/version/tag.rb', line 20 def reachable? @repository..key?(@tag) end |
#ref ⇒ Object
12 13 14 |
# File 'lib/git_compound/component/version/tag.rb', line 12 def ref @tag end |
#sha ⇒ Object
16 17 18 |
# File 'lib/git_compound/component/version/tag.rb', line 16 def sha @repository.[@tag] end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/git_compound/component/version/tag.rb', line 24 def to_s "tag: #{@tag}" end |