Class: HrrRbSsh::Compat::OpenSSH::AuthorizedKeys

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/hrr_rb_ssh/compat/openssh/authorized_keys.rb

Instance Method Summary collapse

Constructor Details

#initialize(data_str) ⇒ AuthorizedKeys

Returns a new instance of AuthorizedKeys.



8
9
10
11
12
# File 'lib/hrr_rb_ssh/compat/openssh/authorized_keys.rb', line 8

def initialize data_str
  @public_keys = data_str.each_line.map{ |line|
    PublicKey.new line
  }
end

Instance Method Details

#eachObject



14
15
16
17
18
# File 'lib/hrr_rb_ssh/compat/openssh/authorized_keys.rb', line 14

def each
  @public_keys.each{ |public_key|
    yield public_key
  }
end