Class: Clerk::Models::Components::Key
- Inherits:
-
Object
- Object
- Clerk::Models::Components::Key
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/key.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(use: nil, kty: nil, kid: nil, alg: nil, n: nil, e: nil, x: nil, crv: nil) ⇒ Key
constructor
A new instance of Key.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(use: nil, kty: nil, kid: nil, alg: nil, n: nil, e: nil, x: nil, crv: nil) ⇒ Key
Returns a new instance of Key.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/clerk/models/components/key.rb', line 33 def initialize(use: nil, kty: nil, kid: nil, alg: nil, n: nil, e: nil, x: nil, crv: nil) @use = use @kty = kty @kid = kid @alg = alg @n = n @e = e @x = x @crv = crv end |
Instance Method Details
#==(other) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/clerk/models/components/key.rb', line 45 def ==(other) return false unless other.is_a? self.class return false unless @use == other.use return false unless @kty == other.kty return false unless @kid == other.kid return false unless @alg == other.alg return false unless @n == other.n return false unless @e == other.e return false unless @x == other.x return false unless @crv == other.crv true end |