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, #push_input, #receive_data
Constructor Details
#initialize(other_loop = nil) ⇒ Connection
Returns a new instance of Connection.
144 145 146 147 148 149 150 |
# File 'lib/farcall/transport.rb', line 144 def initialize other_loop = nil super() if other_loop other_loop.other = self @other = other_loop end end |
Instance Attribute Details
#other ⇒ Object
Returns the value of attribute other.
142 143 144 |
# File 'lib/farcall/transport.rb', line 142 def other @other end |
Instance Method Details
#send_data(hash) ⇒ Object
152 153 154 |
# File 'lib/farcall/transport.rb', line 152 def send_data hash @other.on_data_received.call hash end |