Method: RFlow::Component::HashPort#connections_for

Defined in:
lib/rflow/component/port.rb

#connections_for(key) ⇒ Object

Returns an Array of all the connections that should be sent/received on this subport. Merges the nil-keyed port (i.e. any connections for a port without a key) to those specific for the key, so should only be used to read a list of connections, not to add new ones. Use add_connection to add a new connection for a given key.



100
101
102
103
104
105
# File 'lib/rflow/component/port.rb', line 100

def connections_for(key)
  case key
  when nil; @connections_for[nil]
  else @connections_for[key] + @connections_for[nil]
  end
end