Class: HrrRbSsh::Transport::MacAlgorithm::MacAlgorithm

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

Constant Summary collapse

@@list =
Array.new

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ MacAlgorithm

Returns a new instance of MacAlgorithm.



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

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

Class Method Details

.[](key) ⇒ Object



24
25
26
# File 'lib/hrr_rb_ssh/transport/mac_algorithm/mac_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/mac_algorithm/mac_algorithm.rb', line 12

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

.listObject



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

def self.list
  @@list
end

.name_listObject



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

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