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.
61 62 63 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 61 def initialize(socket) @socket = socket end |
Instance Attribute Details
#pair ⇒ Object
Returns the value of attribute pair.
58 59 60 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 58 def pair @pair end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
59 60 61 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 59 def socket @socket end |
#thread ⇒ Object
Returns the value of attribute thread.
58 59 60 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 58 def thread @thread end |
Instance Method Details
#close ⇒ Object
65 66 67 68 69 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 65 def close pair&.close socket.close unless socket.closed? thread&.terminate end |