Class: Gitlab::X509::Commit

Inherits:
SignedCommit show all
Defined in:
lib/gitlab/x509/commit.rb

Instance Method Summary collapse

Methods inherited from SignedCommit

#initialize, #signature_text, #signed_text

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

This class inherits a constructor from Gitlab::SignedCommit

Instance Method Details

#signatureObject


8
9
10
11
12
13
14
15
16
17
# File 'lib/gitlab/x509/commit.rb', line 8

def signature
  super

  return @signature if @signature

  cached_signature = lazy_signature&.itself
  return @signature = cached_signature if cached_signature.present?

  @signature = create_cached_signature!
end

#update_signature!(cached_signature) ⇒ Object


19
20
21
22
# File 'lib/gitlab/x509/commit.rb', line 19

def update_signature!(cached_signature)
  cached_signature.update!(attributes)
  @signature = cached_signature
end