Class: COSE::Key::Curve
- Inherits:
-
Struct
- Object
- Struct
- COSE::Key::Curve
- Defined in:
- lib/cose/key/curve.rb
Overview
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pkey_name ⇒ Object
Returns the value of attribute pkey_name.
Class Method Summary collapse
- .by_name(name) ⇒ Object
- .by_pkey_name(pkey_name) ⇒ Object
- .find(id) ⇒ Object
- .register(id, name, pkey_name) ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
6 7 8 |
# File 'lib/cose/key/curve.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/cose/key/curve.rb', line 6 def name @name end |
#pkey_name ⇒ Object
Returns the value of attribute pkey_name
6 7 8 |
# File 'lib/cose/key/curve.rb', line 6 def pkey_name @pkey_name end |
Class Method Details
.by_name(name) ⇒ Object
17 18 19 |
# File 'lib/cose/key/curve.rb', line 17 def self.by_name(name) @curves.values.detect { |curve| curve.name == name } end |
.by_pkey_name(pkey_name) ⇒ Object
21 22 23 |
# File 'lib/cose/key/curve.rb', line 21 def self.by_pkey_name(pkey_name) @curves.values.detect { |curve| curve.pkey_name == pkey_name } end |
.find(id) ⇒ Object
13 14 15 |
# File 'lib/cose/key/curve.rb', line 13 def self.find(id) @curves[id] end |
.register(id, name, pkey_name) ⇒ Object
9 10 11 |
# File 'lib/cose/key/curve.rb', line 9 def self.register(id, name, pkey_name) @curves[id] = new(id, name, pkey_name) end |
Instance Method Details
#value ⇒ Object
25 26 27 |
# File 'lib/cose/key/curve.rb', line 25 def value id end |