Method: OFlow::Task#link
- Defined in:
- lib/oflow/task.rb
#link(label, target, op, flow_name = nil) ⇒ Object
127 128 129 130 131 132 133 |
# File 'lib/oflow/task.rb', line 127 def link(label, target, op, flow_name=nil) label = label.to_sym unless label.nil? op = op.to_sym unless op.nil? flow_name = flow_name.to_sym unless flow_name.nil? raise ConfigError.new("Link #{label} already exists.") unless @links[label].nil? @links[label] = Link.new(flow_name, target.to_sym, op) end |