Class: RFlow::Component::OutputPort
- Defined in:
- lib/rflow/component/port.rb
Instance Attribute Summary
Attributes inherited from HashPort
Attributes inherited from Port
Instance Method Summary collapse
- #add_connection(key, connection) ⇒ Object
- #connect! ⇒ Object
-
#send_message(message) ⇒ Object
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) ⇒ Object
193 194 195 196 |
# File 'lib/rflow/component/port.rb', line 193 def add_connection(key, connection) super connection.connect_output! if connected? end |
#connect! ⇒ Object
188 189 190 191 |
# File 'lib/rflow/component/port.rb', line 188 def connect! @connections_for.each {|key, conns| conns.each {|c| c.connect_output! } } @connected = true end |
#send_message(message) ⇒ Object
Send a message to all connections on all keys for this port, but only once per connection.
200 201 202 |
# File 'lib/rflow/component/port.rb', line 200 def () all_connections.() end |