Class: DS::Extractor::CsvRecordLocator

Inherits:
Object
  • Object
show all
Defined in:
lib/ds/extractor/csv_record_locator.rb

Instance Method Summary collapse

Instance Method Details

#locate_record(csv, id, id_location) ⇒ Object



7
8
9
10
# File 'lib/ds/extractor/csv_record_locator.rb', line 7

def locate_record csv, id, id_location
  csv.rewind
  csv.filter_map { |row| row if row[id_location] == id}
end