sanger/sequencescape

View on GitHub
lib/manifest_util.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true
module ManifestUtil
  def is_end_of_header?(row, pos)
    ((pos != (row.length - 1)) && row[pos].blank? && row[pos + 1].blank?)
  end

  def filter_end_of_header(header_row)
    found_end_of_header = false
    header_row.reject.each_with_index { |_value, pos| found_end_of_header ||= is_end_of_header?(header_row, pos) }
  end
end