Class: Hiptest::NodeModifiers::DefaultArgumentAdder
- Inherits:
-
Object
- Object
- Hiptest::NodeModifiers::DefaultArgumentAdder
- Defined in:
- lib/hiptest-publisher/node_modifiers/call_arguments_adder.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project) ⇒ DefaultArgumentAdder
constructor
A new instance of DefaultArgumentAdder.
- #update_calls ⇒ Object
Constructor Details
#initialize(project) ⇒ DefaultArgumentAdder
Returns a new instance of DefaultArgumentAdder.
12 13 14 15 16 |
# File 'lib/hiptest-publisher/node_modifiers/call_arguments_adder.rb', line 12 def initialize(project) @project = project @library_indexer = LibraryActionwordIndexer.new(project) @indexer = ActionwordIndexer.new(project) end |
Class Method Details
.add(project) ⇒ Object
8 9 10 |
# File 'lib/hiptest-publisher/node_modifiers/call_arguments_adder.rb', line 8 def self.add(project) self.new(project).update_calls end |
Instance Method Details
#update_calls ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/hiptest-publisher/node_modifiers/call_arguments_adder.rb', line 18 def update_calls @project.each_sub_nodes(Hiptest::Nodes::Call) do |call| actionword = @library_indexer.get_index(call.children[:actionword]) actionword = @indexer.get_index(call.children[:actionword]) if actionword.nil? update_call(call, actionword) end end |