Class: Minisign::Signature
- Inherits:
-
Object
- Object
- Minisign::Signature
- Defined in:
- lib/minisign.rb
Overview
Parse a .minisig file’s contents
Instance Attribute Summary collapse
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#comment_signature ⇒ Object
readonly
Returns the value of attribute comment_signature.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Instance Method Summary collapse
-
#initialize(str) ⇒ Signature
constructor
A new instance of Signature.
Constructor Details
#initialize(str) ⇒ Signature
Returns a new instance of Signature.
12 13 14 15 16 17 |
# File 'lib/minisign.rb', line 12 def initialize(str) lines = str.split("\n") @signature = Base64.decode64(lines[1])[10..] @comment = lines[2].split('trusted comment: ')[1] @comment_signature = Base64.decode64(lines[3]) end |
Instance Attribute Details
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
10 11 12 |
# File 'lib/minisign.rb', line 10 def comment @comment end |
#comment_signature ⇒ Object (readonly)
Returns the value of attribute comment_signature.
10 11 12 |
# File 'lib/minisign.rb', line 10 def comment_signature @comment_signature end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
10 11 12 |
# File 'lib/minisign.rb', line 10 def signature @signature end |