Method: OFlow::Task#resolve_link

Defined in:
lib/oflow/task.rb

Attempts to find and resolve the Link identified by the label. Resolving a Link uses the target identifier to find the target Task and save that in the Link.

Parameters:

  • label (Symbol|String)

    identifer of the Link

Returns:

  • (Link)

    returns the Link for the label



470
471
472
473
474
475
476
# File 'lib/oflow/task.rb', line 470

def resolve_link(label)
  label = label.to_sym unless label.nil?
  lnk = @links[label] || @links[nil]
  return nil if lnk.nil?
  set_link_target(lnk) if lnk.target.nil?
  lnk
end