Sha256: 4d01544e2fc65b375a45ec32459d3eb6da931cb4e47ad8735592384783ec88ea
Contents?: true
Size: 1.36 KB
Versions: 37
Compression:
Stored size: 1.36 KB
Contents
module OrigenTesters::ATP module Processors # Adds the flow ID to all ids and label names class FlowID < Processor attr_reader :id def run(node, id) @id = id process(node) end def on_id(node) if node.value =~ /^extern/ node else node.updated(nil, ["#{node.value}_#{id}"]) end end def on_if_failed(node) tid, *nodes = *node if tid.is_a?(Array) tid = tid.map do |tid| if tid =~ /^extern/ tid else "#{tid}_#{id}" end end else if tid !~ /^extern/ tid = "#{tid}_#{id}" end end node.updated(nil, [tid] + process_all(nodes)) end alias_method :on_if_any_failed, :on_if_failed alias_method :on_if_all_failed, :on_if_failed alias_method :on_if_passed, :on_if_failed alias_method :on_if_any_passed, :on_if_failed alias_method :on_if_all_passed, :on_if_failed alias_method :on_if_ran, :on_if_failed alias_method :on_unless_ran, :on_if_failed alias_method :on_if_any_sites_failed, :on_if_failed alias_method :on_if_all_sites_failed, :on_if_failed alias_method :on_if_any_sites_passed, :on_if_failed alias_method :on_if_all_sites_passed, :on_if_failed end end end
Version data entries
37 entries across 37 versions & 1 rubygems