lib/node_mutation.rb in node_mutation-1.3.2 vs lib/node_mutation.rb in node_mutation-1.3.3
- old
+ new
@@ -255,11 +255,11 @@
raise ConflictActionError, "mutation actions are conflicted"
end
NodeMutation::Result.new(
affected: true,
conflicted: !conflict_actions.empty?,
- actions: @actions
+ actions: format_actions(@actions)
)
end
private
@@ -280,7 +280,11 @@
start = @actions[i].start
end
j -= 1
end
conflict_actions
+ end
+
+ def format_actions(actions)
+ actions.map { |action| OpenStruct.new(start: action.start, end: action.end, new_code: action.new_code ) }
end
end