Class: LegoEv3::SSHConnection

Inherits:
BaseConnection show all
Defined in:
lib/connection/ssh.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseConnection

#flush, #send

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

#timeoutObject

Returns the value of attribute timeout.



5
6
7
# File 'lib/connection/ssh.rb', line 5

def timeout
  @timeout
end

Instance Method Details

#closeObject



17
18
19
20
# File 'lib/connection/ssh.rb', line 17

def close
  @connection.close if @connection
  @connection = nil
end