Class: HrrRbSsh::Transport::ServerHostKeyAlgorithm::ServerHostKeyAlgorithm

Inherits:
Object
  • Object
show all
Defined in:
lib/hrr_rb_ssh/transport/server_host_key_algorithm/server_host_key_algorithm.rb

Constant Summary collapse

@@list =
Array.new

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServerHostKeyAlgorithm

Returns a new instance of ServerHostKeyAlgorithm.



28
29
30
# File 'lib/hrr_rb_ssh/transport/server_host_key_algorithm/server_host_key_algorithm.rb', line 28

def initialize
  @logger = HrrRbSsh::Logger.new self.class.name
end

Class Method Details

.[](key) ⇒ Object



24
25
26
# File 'lib/hrr_rb_ssh/transport/server_host_key_algorithm/server_host_key_algorithm.rb', line 24

def self.[] key
  @@list.find{ |klass| key == klass::NAME }
end

.inherited(klass) ⇒ Object



12
13
14
# File 'lib/hrr_rb_ssh/transport/server_host_key_algorithm/server_host_key_algorithm.rb', line 12

def self.inherited klass
  @@list.push klass
end

.listObject



16
17
18
# File 'lib/hrr_rb_ssh/transport/server_host_key_algorithm/server_host_key_algorithm.rb', line 16

def self.list
  @@list
end

.name_listObject



20
21
22
# File 'lib/hrr_rb_ssh/transport/server_host_key_algorithm/server_host_key_algorithm.rb', line 20

def self.name_list
  @@list.map{ |klass| klass::NAME }
end