Class: Gitlab::SignedTag
- Inherits:
-
Object
- Object
- Gitlab::SignedTag
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/signed_tag.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(repository, tag) ⇒ SignedTag
constructor
A new instance of SignedTag.
- #signature ⇒ Object
- #signature_text ⇒ Object
- #signed_text ⇒ Object
Constructor Details
#initialize(repository, tag) ⇒ SignedTag
Returns a new instance of SignedTag.
7 8 9 10 11 |
# File 'lib/gitlab/signed_tag.rb', line 7 def initialize(repository, tag) @repository = repository @tag = tag @signature_data = Gitlab::Git::Tag.extract_signature_lazily(repository, tag.id) if repository end |
Instance Method Details
#signature ⇒ Object
13 14 15 |
# File 'lib/gitlab/signed_tag.rb', line 13 def signature return unless @tag.has_signature? end |
#signature_text ⇒ Object
17 18 19 |
# File 'lib/gitlab/signed_tag.rb', line 17 def signature_text @signature_data&.fetch(0) end |
#signed_text ⇒ Object
21 22 23 |
# File 'lib/gitlab/signed_tag.rb', line 21 def signed_text @signature_data&.fetch(1) end |