write_link

in app/decorators/data_bundle_decorator.rb [106:121]


  def write_link(link, dataflow)
    stream = {}
    if dataflow.sources.select { |s| s.name == link.source } != []
      stream[:source] = link.source
      stream[:file_content] = inputs[link.source] unless inputs[link.source].nil?
    else
      stream[:source] = processor_by_name(dataflow, link.source)
    end
    if dataflow.sinks.select { |s| s.name == link.sink } != []
      stream[:target] = link.sink
    else
      stream[:target] = processor_by_name(dataflow, link.sink)
    end
    stream
  end