Class: RFlow::ForwardToInputPort
- Inherits:
-
Connection
- Object
- Connection
- RFlow::ForwardToInputPort
- Defined in:
- lib/rflow/connection.rb
Overview
Manually shuffle messages in-process from one output port to another output port. Can be used to get a Facade pattern effect - to have one component contain other components within it, shuttling messages in and out without making the internal component visible to the larger RFlow network.
Instance Attribute Summary
Attributes inherited from Connection
#config, #name, #options, #recv_callback, #uuid
Instance Method Summary collapse
-
#initialize(target_port) ⇒ ForwardToInputPort
constructor
A new instance of ForwardToInputPort.
- #send_message(message) ⇒ Object
Methods inherited from Connection
build, #connect_input!, #connect_output!, #input_port_key, #output_port_key
Constructor Details
#initialize(target_port) ⇒ ForwardToInputPort
Returns a new instance of ForwardToInputPort.
101 102 103 104 105 |
# File 'lib/rflow/connection.rb', line 101 def initialize(target_port) super(RFlow::Configuration::NullConnectionConfiguration.new) @receiver = target_port.component @target_port = target_port end |
Instance Method Details
#send_message(message) ⇒ Object
107 108 109 |
# File 'lib/rflow/connection.rb', line 107 def () @receiver.(@target_port, nil, self, ) end |