Class: Gitlab::X509::Tag

Inherits:
Object
  • Object
show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/x509/tag.rb

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

#initialize(raw_tag) ⇒ Tag

Returns a new instance of Tag.


10
11
12
# File 'lib/gitlab/x509/tag.rb', line 10

def initialize(raw_tag)
  @raw_tag = raw_tag
end

Instance Method Details

#signatureObject


14
15
16
17
18
19
20
# File 'lib/gitlab/x509/tag.rb', line 14

def signature
  signature = X509::Signature.new(signature_text, signed_text, @raw_tag.tagger.email, Time.at(@raw_tag.tagger.date.seconds))

  return if signature.verified_signature.nil?

  signature
end