Method not available on this version
This method is only available on newer versions. The first available version of the method is shown here.
build_details_for_unwind()
private
@return [UnwindDetails]
Details of the nearest index to which we could unwind
Show source
def build_details_for_unwind
current_conflict = conflicts[name]
binding_requirements = binding_requirements_for_conflict(current_conflict)
unwind_details = unwind_options_for_requirements(binding_requirements)
last_detail_for_current_unwind = unwind_details.sort.last
current_detail = last_detail_for_current_unwind
relevant_unused_unwinds = unused_unwind_options.select do |alternative|
intersecting_requirements =
last_detail_for_current_unwind.all_requirements &
alternative.requirements_unwound_to_instead
next if intersecting_requirements.empty?
current_detail = alternative if alternative > current_detail
alternative
end
state.unused_unwind_options += unwind_details.reject { |detail| detail.state_index == -1 }
relevant_unused_unwinds.each { |d| d.requirements_unwound_to_instead << current_detail.state_requirement }
unwind_details.each { |d| d.requirements_unwound_to_instead << current_detail.state_requirement }
current_detail
end