Class: LegoEv3::RemoteConnection
- Inherits:
-
BaseConnection
- Object
- BaseConnection
- LegoEv3::RemoteConnection
- Defined in:
- lib/connection/remote.rb
Instance Attribute Summary collapse
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(host, user, password) ⇒ RemoteConnection
constructor
A new instance of RemoteConnection.
Methods inherited from BaseConnection
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
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/connection/remote.rb', line 5 def timeout @timeout end |
Instance Method Details
#close ⇒ Object
16 17 18 19 |
# File 'lib/connection/remote.rb', line 16 def close @connection.close if @connection @connection = nil end |