Class: AndSon::Connection
- Inherits:
-
Struct
- Object
- Struct
- AndSon::Connection
- Defined in:
- lib/and-son/connection.rb
Defined Under Namespace
Modules: NoRequest
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host
6 7 8 |
# File 'lib/and-son/connection.rb', line 6 def host @host end |
#port ⇒ Object
Returns the value of attribute port
6 7 8 |
# File 'lib/and-son/connection.rb', line 6 def port @port end |
Instance Method Details
#open ⇒ Object
11 12 13 14 15 16 |
# File 'lib/and-son/connection.rb', line 11 def open protocol_connection = Sanford::Protocol::Connection.new(tcp_socket) yield protocol_connection if block_given? ensure protocol_connection.close if protocol_connection end |