Class: Nonnative::FaultInjectionProxy::Connection
- Inherits:
-
Object
- Object
- Nonnative::FaultInjectionProxy::Connection
- Defined in:
- lib/nonnative/fault_injection_proxy.rb
Instance Attribute Summary collapse
-
#pair ⇒ Object
Returns the value of attribute pair.
-
#socket ⇒ Object
readonly
Returns the value of attribute socket.
-
#thread ⇒ Object
Returns the value of attribute thread.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(socket) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(socket) ⇒ Connection
Returns a new instance of Connection.
42 43 44 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 42 def initialize(socket) @socket = socket end |
Instance Attribute Details
#pair ⇒ Object
Returns the value of attribute pair.
39 40 41 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 39 def pair @pair end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
40 41 42 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 40 def socket @socket end |
#thread ⇒ Object
Returns the value of attribute thread.
39 40 41 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 39 def thread @thread end |
Instance Method Details
#close ⇒ Object
46 47 48 49 50 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 46 def close pair&.close socket.close unless socket.closed? thread&.terminate end |