Class: Hiptest::NodeModifiers::UidCallReferencerAdder
- Inherits:
-
Object
- Object
- Hiptest::NodeModifiers::UidCallReferencerAdder
- Defined in:
- lib/hiptest-publisher/node_modifiers/uid_call_reference_adder.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project) ⇒ UidCallReferencerAdder
constructor
A new instance of UidCallReferencerAdder.
- #update_uid_calls ⇒ Object
Constructor Details
#initialize(project) ⇒ UidCallReferencerAdder
Returns a new instance of UidCallReferencerAdder.
11 12 13 14 |
# File 'lib/hiptest-publisher/node_modifiers/uid_call_reference_adder.rb', line 11 def initialize(project) @project = project @indexer = ActionwordUidIndexer.new(project) end |
Class Method Details
.add(project) ⇒ Object
7 8 9 |
# File 'lib/hiptest-publisher/node_modifiers/uid_call_reference_adder.rb', line 7 def self.add(project) self.new(project).update_uid_calls end |
Instance Method Details
#update_uid_calls ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/hiptest-publisher/node_modifiers/uid_call_reference_adder.rb', line 16 def update_uid_calls @project.each_sub_nodes(Hiptest::Nodes::UIDCall) do |uid_call| index = @indexer.get_index(uid_call.children[:uid]) next if index.nil? uid_call.children[:actionword_name] = index[:actionword].children[:name] uid_call.children[:library_name] = index[:library].children[:name] unless index[:library].nil? end end |