Method: Remi::DataSource::CsvFile#first_line
- Defined in:
- lib/remi/data_source/csv_file.rb
#first_line ⇒ Object
63 64 65 66 67 68 |
# File 'lib/remi/data_source/csv_file.rb', line 63 def first_line # Readline assumes \n line endings. Strip out \r if it is a DOS file. @first_line ||= File.open(source_filename) do |f| f.readline.gsub(/\r/,'') end end |