class RFlow::Component::OutputPort
An actual {Component} output port.
Public Instance Methods
add_connection(key, connection)
click to toggle source
Add and start up a new {Connection}. @param key [String] the key to subscript with @param connection [Connection] the connection to add @return [void]
Calls superclass method
RFlow::Component::HashPort#add_connection
# File lib/rflow/component/port.rb, line 288 def add_connection(key, connection) super connection.connect_output! if connected? end
connect!()
click to toggle source
Connect all the output connections, once everything's been set up. @return [void]
# 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)
click to toggle source
Send a message to all connections on all keys for this port, but only once per connection. @param message [RFlow::Message] the message to send @return [void]
# File lib/rflow/component/port.rb, line 297 def send_message(message) all_connections.send_message(message) end