Sha256: 86575667ccee8c443f2b095e25d72d159f22079343c6d312f592b8c29fc908ec
Contents?: true
Size: 1.25 KB
Versions: 23
Compression:
Stored size: 1.25 KB
Contents
module RubyGPG2 class Key attr_reader( :type, :validity, :length, :algorithm, :id, :creation_date, :owner_trust, :capabilities, :serial_number, :compliance_modes, :origin, :fingerprint, :user_ids) def initialize(opts) @type = opts[:type] @validity = opts[:validity] @length = opts[:length] @algorithm = opts[:algorithm] @id = opts[:id] @creation_date = opts[:creation_date] @owner_trust = opts[:owner_trust] @capabilities = opts[:capabilities] @serial_number = opts[:serial_number] @compliance_modes = opts[:compliance_modes] @origin = opts[:origin] @fingerprint = opts[:fingerprint] @user_ids = opts[:user_ids] end def primary_user_id @user_ids&.first end def ==(other) other.class == self.class && other.state == state end protected def state [ @type, @validity, @length, @algorithm, @id, @creation_date, @owner_trust, @capabilities, @serial_number, @compliance_modes, @origin, @fingerprint ] end end end
Version data entries
23 entries across 23 versions & 1 rubygems