Class: LegoEv3::RemoteConnection

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseConnection

#flush, #send

Constructor Details

#initialize(host, user, password) ⇒ RemoteConnection

Returns a new instance of RemoteConnection.



7
8
9
10
11
12
13
14
# File 'lib/connection/remote.rb', line 7

def initialize(host, user, password)
  super()

  @host = host
  @user = user
  @password = password
  @timeout = 10
end

Instance Attribute Details

#timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

Instance Method Details

#closeObject



16
17
18
19
# File 'lib/connection/remote.rb', line 16

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