Class: Net::SSH::HostKeys
- Inherits:
-
Array
- Object
- Array
- Net::SSH::HostKeys
- Defined in:
- lib/net/ssh/known_hosts.rb
Overview
Represents the result of a search in known hosts see search_for
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Instance Method Summary collapse
- #add_host_key(key) ⇒ Object
-
#initialize(host_keys, host, known_hosts, options = {}) ⇒ HostKeys
constructor
A new instance of HostKeys.
Constructor Details
#initialize(host_keys, host, known_hosts, options = {}) ⇒ HostKeys
Returns a new instance of HostKeys.
13 14 15 16 17 18 |
# File 'lib/net/ssh/known_hosts.rb', line 13 def initialize(host_keys, host, known_hosts, = {}) super(host_keys) @host = host @known_hosts = known_hosts @options = end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
11 12 13 |
# File 'lib/net/ssh/known_hosts.rb', line 11 def host @host end |
Instance Method Details
#add_host_key(key) ⇒ Object
20 21 22 23 |
# File 'lib/net/ssh/known_hosts.rb', line 20 def add_host_key(key) @known_hosts.add(@host, key, @options) push(key) end |