Class: LegoEv3::SSHConnection
- Inherits:
-
BaseConnection
- Object
- BaseConnection
- LegoEv3::SSHConnection
- Defined in:
- lib/connection/ssh.rb
Instance Attribute Summary collapse
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(host, port, user, password) ⇒ SSHConnection
constructor
A new instance of SSHConnection.
Methods inherited from BaseConnection
Constructor Details
#initialize(host, port, user, password) ⇒ SSHConnection
Returns a new instance of SSHConnection.
7 8 9 10 11 12 13 14 15 |
# File 'lib/connection/ssh.rb', line 7 def initialize(host, port, user, password) super() @host = host @port = port @user = user @password = password @timeout = 10 end |
Instance Attribute Details
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/connection/ssh.rb', line 5 def timeout @timeout end |
Instance Method Details
#close ⇒ Object
17 18 19 20 |
# File 'lib/connection/ssh.rb', line 17 def close @connection.close if @connection @connection = nil end |