Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpg_key_subkey.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8222e5606aa24a5105865497e56b6455c626ddb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class GpgKeySubkey < ActiveRecord::Base
  include ShaAttribute

  sha_attribute :keyid
  sha_attribute :fingerprint

  belongs_to :gpg_key

  def method_missing(m, *a, &b)
    return super unless gpg_key.respond_to?(m)

    gpg_key.public_send(m, *a, &b) # rubocop:disable GitlabSecurity/PublicSend
  end

  def respond_to_missing?(method, include_private = false)
    gpg_key.respond_to?(method, include_private) || super
  end
end