Class: LegoEv3::TCPConnection
- Inherits:
-
BaseConnection
- Object
- BaseConnection
- LegoEv3::TCPConnection
- Defined in:
- lib/connection/tcp_client.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(host) ⇒ TCPConnection
constructor
A new instance of TCPConnection.
Methods inherited from BaseConnection
Constructor Details
#initialize(host) ⇒ TCPConnection
Returns a new instance of TCPConnection.
6 7 8 9 10 |
# File 'lib/connection/tcp_client.rb', line 6 def initialize(host) super() @host = host end |
Instance Method Details
#close ⇒ Object
12 13 14 15 |
# File 'lib/connection/tcp_client.rb', line 12 def close @connection.close if @connection @connection = nil end |