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


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

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

#is_end_of_header?(row, pos) ⇒ Boolean

Returns:

  • (Boolean)

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

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