Class: Farcall::LocalConnection::Connection
- Defined in:
- lib/farcall/transport.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#other ⇒ Object
Returns the value of attribute other.
Attributes inherited from Transport
#on_abort, #on_close, #on_data_received
Instance Method Summary collapse
-
#initialize(other_loop = nil) ⇒ Connection
constructor
A new instance of Connection.
- #send_data(hash) ⇒ Object
Methods inherited from Transport
#close, #closed?, create, #receive_data
Constructor Details
#initialize(other_loop = nil) ⇒ Connection
Returns a new instance of Connection.
101 102 103 104 105 106 |
# File 'lib/farcall/transport.rb', line 101 def initialize other_loop = nil if other_loop other_loop.other = self @other = other_loop end end |
Instance Attribute Details
#other ⇒ Object
Returns the value of attribute other.
99 100 101 |
# File 'lib/farcall/transport.rb', line 99 def other @other end |
Instance Method Details
#send_data(hash) ⇒ Object
108 109 110 |
# File 'lib/farcall/transport.rb', line 108 def send_data hash @other.on_data_received.call hash end |