Class: NicInfo::KeyData
- Inherits:
-
Object
- Object
- NicInfo::KeyData
- Defined in:
- lib/nicinfo/key_data.rb
Overview
deals with RDAP key data structures
Instance Attribute Summary collapse
-
#asEventActors ⇒ Object
Returns the value of attribute asEventActors.
-
#objectclass ⇒ Object
Returns the value of attribute objectclass.
Instance Method Summary collapse
- #display ⇒ Object
- #get_cn ⇒ Object
-
#initialize(config) ⇒ KeyData
constructor
A new instance of KeyData.
- #process(json_data) ⇒ Object
- #to_node ⇒ Object
Constructor Details
#initialize(config) ⇒ KeyData
Returns a new instance of KeyData.
32 33 34 35 36 |
# File 'lib/nicinfo/key_data.rb', line 32 def initialize config @config = config @common = CommonJson.new config @asEventActors = Array.new end |
Instance Attribute Details
#asEventActors ⇒ Object
Returns the value of attribute asEventActors.
30 31 32 |
# File 'lib/nicinfo/key_data.rb', line 30 def asEventActors @asEventActors end |
#objectclass ⇒ Object
Returns the value of attribute objectclass.
30 31 32 |
# File 'lib/nicinfo/key_data.rb', line 30 def objectclass @objectclass end |
Instance Method Details
#display ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/nicinfo/key_data.rb', line 43 def display @config.logger.start_data_item @config.logger.data_title "[ KEY DATA ]" @config.logger.terse "Algorithm", NicInfo::get_algorithm( @objectclass ) @config.logger.terse "Flags", @objectclass[ "flags" ] @config.logger.terse "Protocol", @objectclass[ "protocol" ] @config.logger.terse "Public Key", @objectclass[ "publicKey" ] @common.display_events @objectclass @common.display_as_events_actors @asEventActors @config.logger.end_data_item end |
#get_cn ⇒ Object
55 56 57 58 59 60 |
# File 'lib/nicinfo/key_data.rb', line 55 def get_cn algorithm = NicInfo::DNSSEC_ALGORITHMS[ NicInfo::get_algorithm( @objectclass ) ] algorithm = algorithm + " Key Data" if algorithm algorithm = "(unidentifiable key data #{object_id})" if !algorithm return algorithm end |
#process(json_data) ⇒ Object
38 39 40 41 |
# File 'lib/nicinfo/key_data.rb', line 38 def process json_data @objectclass = json_data return self end |