Class: RecordStore::Record::SSHFP
- Inherits:
-
RecordStore::Record
- Object
- RecordStore::Record
- RecordStore::Record::SSHFP
- Defined in:
- lib/record_store/record/sshfp.rb
Defined Under Namespace
Modules: Algorithms, FingerprintTypes
Constant Summary collapse
- FINGERPRINT_REGEX =
/\A[[:xdigit:]]+\z/
Constants inherited from RecordStore::Record
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#fingerprint ⇒ Object
Returns the value of attribute fingerprint.
-
#fptype ⇒ Object
Returns the value of attribute fptype.
Attributes inherited from RecordStore::Record
Instance Method Summary collapse
-
#initialize(record) ⇒ SSHFP
constructor
A new instance of SSHFP.
- #rdata ⇒ Object
- #rdata_txt ⇒ Object
Methods inherited from RecordStore::Record
#==, build_from_yaml_definition, ensure_ends_with_dot, ensure_ends_without_dot, escape, #hash, #key, #log!, long_quote, needs_long_quotes?, quote, #to_hash, #to_json, #to_s, #type, unescape, unlong_quote, unquote, #wildcard?
Constructor Details
#initialize(record) ⇒ SSHFP
Returns a new instance of SSHFP.
36 37 38 39 40 41 42 |
# File 'lib/record_store/record/sshfp.rb', line 36 def initialize(record) super @algorithm = record.fetch(:algorithm) @fptype = record.fetch(:fptype) @fingerprint = record.fetch(:fingerprint) end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
3 4 5 |
# File 'lib/record_store/record/sshfp.rb', line 3 def algorithm @algorithm end |
#fingerprint ⇒ Object
Returns the value of attribute fingerprint.
3 4 5 |
# File 'lib/record_store/record/sshfp.rb', line 3 def fingerprint @fingerprint end |
#fptype ⇒ Object
Returns the value of attribute fptype.
3 4 5 |
# File 'lib/record_store/record/sshfp.rb', line 3 def fptype @fptype end |
Instance Method Details
#rdata ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/record_store/record/sshfp.rb', line 44 def rdata { algorithm: algorithm, fingerprint: fingerprint, fptype: fptype, } end |
#rdata_txt ⇒ Object
52 53 54 |
# File 'lib/record_store/record/sshfp.rb', line 52 def rdata_txt "#{algorithm} #{fptype} #{fingerprint}" end |