Class: Prevoty::ECDSASignature
- Inherits:
-
Object
- Object
- Prevoty::ECDSASignature
- Defined in:
- lib/prevoty/responses/ecdsa_signature.rb
Instance Attribute Summary collapse
-
#r ⇒ Object
readonly
Returns the value of attribute r.
-
#s ⇒ Object
readonly
Returns the value of attribute s.
Instance Method Summary collapse
-
#initialize(data) ⇒ ECDSASignature
constructor
A new instance of ECDSASignature.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(data) ⇒ ECDSASignature
Returns a new instance of ECDSASignature.
5 6 7 8 |
# File 'lib/prevoty/responses/ecdsa_signature.rb', line 5 def initialize(data) @r = data["r"] @s = data["s"] end |
Instance Attribute Details
#r ⇒ Object (readonly)
Returns the value of attribute r.
3 4 5 |
# File 'lib/prevoty/responses/ecdsa_signature.rb', line 3 def r @r end |
#s ⇒ Object (readonly)
Returns the value of attribute s.
3 4 5 |
# File 'lib/prevoty/responses/ecdsa_signature.rb', line 3 def s @s end |
Instance Method Details
#to_json(*a) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/prevoty/responses/ecdsa_signature.rb', line 10 def to_json(*a) { r: @r, s: @s }.to_json end |