Module: ManifestUtil

Included in:
BulkSubmission
Defined in:
lib/manifest_util.rb

Instance Method Summary collapse

Instance Method Details

#filter_end_of_header(header_row) ⇒ Object



7
8
9
10
# File 'lib/manifest_util.rb', line 7

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

#is_end_of_header?(row, pos) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/manifest_util.rb', line 3

def is_end_of_header?(row, pos)
  (pos != (row.length - 1)) && row[pos].blank? && row[pos + 1].blank?
end