blob: fddec1e823aa392d54dd295de2403b108607d214 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
class PgpKey
include ActiveModel::Validations
# mostly for testing.
attr_accessor :key_block
def initialize(key_block = nil)
@key_block = key_block
end
def to_s
@key_block
end
def present?
@key_block.present?
end
# let's allow comparison with plain key_block strings.
def ==(other)
self.equal?(other) or
self.to_s == other
end
end
|