class SimpleCov::SourceFile

def build_branches_from(condition, branches)

def build_branches_from(condition, branches)
  # the format handed in from the coverage data is like this:
  #
  #     [:then, 4, 6, 6, 6, 10]
  #
  # which is [type, id, start_line, start_col, end_line, end_col]
  condition_type, condition_id, condition_start_line, * = restore_ruby_data_structure(condition)
  branches
    .map { |branch_data, hit_count| [restore_ruby_data_structure(branch_data), hit_count] }
    .reject { |branch_data, _hit_count| ignore_branch?(branch_data, condition_type, condition_start_line) }
    .map { |branch_data, hit_count| build_branch(branch_data, hit_count, condition_start_line, condition_id) }
end