Class: RFlow::ForwardToOutputPort
- Inherits:
-
Connection
- Object
- Connection
- RFlow::ForwardToOutputPort
- 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) ⇒ ForwardToOutputPort
constructor
A new instance of ForwardToOutputPort.
-
#send_message(message) ⇒ void
Override of #send_message which forwards the message to the target port.
Methods inherited from Connection
build, #connect_input!, #connect_output!, #input_port_key, #output_port_key
Constructor Details
#initialize(target_port) ⇒ ForwardToOutputPort
Returns a new instance of ForwardToOutputPort.
117 118 119 120 |
# File 'lib/rflow/connection.rb', line 117 def initialize(target_port) super(RFlow::Configuration::NullConnectionConfiguration.new) @target_port = target_port end |
Instance Method Details
#send_message(message) ⇒ void
This method returns an undefined value.
Override of #send_message which forwards the message to the target port.
124 125 126 |
# File 'lib/rflow/connection.rb', line 124 def () @target_port.() end |