Class: OrigenTesters::ATP::Processors::FlowID
- Inherits:
-
OrigenTesters::ATP::Processor
- Object
- OrigenTesters::ATP::Processor
- OrigenTesters::ATP::Processors::FlowID
- Defined in:
- lib/origen_testers/atp/processors/flow_id.rb
Overview
Adds the flow ID to all ids and label names
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #on_id(node) ⇒ Object
- #on_if_failed(node) ⇒ Object (also: #on_if_any_failed, #on_if_all_failed, #on_if_passed, #on_if_any_passed, #on_if_all_passed, #on_if_ran, #on_unless_ran, #on_if_any_sites_failed, #on_if_all_sites_failed, #on_if_any_sites_passed, #on_if_all_sites_passed)
- #run(node, id) ⇒ Object
Methods inherited from OrigenTesters::ATP::Processor
#add_global_flag, #clean_flag, #extract_globals, #extract_volatiles, #global_flag?, #global_flags, #handler_missing, #process, #process_all, #volatile?, #volatile_flags
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/origen_testers/atp/processors/flow_id.rb', line 5 def id @id end |
Instance Method Details
#on_id(node) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/origen_testers/atp/processors/flow_id.rb', line 12 def on_id(node) if node.value =~ /^extern/ node else node.updated(nil, ["#{node.value}_#{id}"]) end end |
#on_if_failed(node) ⇒ Object Also known as: on_if_any_failed, on_if_all_failed, on_if_passed, on_if_any_passed, on_if_all_passed, on_if_ran, on_unless_ran, on_if_any_sites_failed, on_if_all_sites_failed, on_if_any_sites_passed, on_if_all_sites_passed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/origen_testers/atp/processors/flow_id.rb', line 20 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 |
#run(node, id) ⇒ Object
7 8 9 10 |
# File 'lib/origen_testers/atp/processors/flow_id.rb', line 7 def run(node, id) @id = id process(node) end |