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, #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
168 169 170 171 |
# File 'lib/rflow/component/port.rb', line 168 def add_connection(key, connection) super connection.connect_output! if connected? end |
#connect! ⇒ Object
163 164 165 166 |
# File 'lib/rflow/component/port.rb', line 163 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.
175 176 177 |
# File 'lib/rflow/component/port.rb', line 175 def () all_connections.() end |