Class: RFlow::Component::OutputPort
- Defined in:
- lib/rflow/component/port.rb
Overview
An actual RFlow::Component output port.
Instance Attribute Summary
Attributes inherited from HashPort
Attributes inherited from Port
Instance Method Summary collapse
-
#add_connection(key, connection) ⇒ void
Add and start up a new RFlow::Connection.
-
#connect! ⇒ void
Connect all the output connections, once everything’s been set up.
-
#send_message(message) ⇒ void
Send a message to all connections on all keys for this port, but only once per connection.
Methods inherited from HashPort
#[], #all_connections, #collect_messages, #connections_for, #direct_connect, #each, #initialize, #keys, #remove_connection
Methods inherited from Port
Constructor Details
This class inherits a constructor from RFlow::Component::HashPort
Instance Method Details
#add_connection(key, connection) ⇒ void
This method returns an undefined value.
Add and start up a new RFlow::Connection.
288 289 290 291 |
# File 'lib/rflow/component/port.rb', line 288 def add_connection(key, connection) super connection.connect_output! if connected? end |
#connect! ⇒ void
This method returns an undefined value.
Connect all the output connections, once everything’s been set up.
279 280 281 282 |
# File 'lib/rflow/component/port.rb', line 279 def connect! @connections_for.each {|key, conns| conns.each {|c| c.connect_output! } } @connected = true end |
#send_message(message) ⇒ void
This method returns an undefined value.
Send a message to all connections on all keys for this port, but only once per connection.
297 298 299 |
# File 'lib/rflow/component/port.rb', line 297 def () all_connections.() end |