lib/simple-spreadsheet/classes/csv_extended.rb in simple-spreadsheet-0.3.1 vs lib/simple-spreadsheet/classes/csv_extended.rb in simple-spreadsheet-0.4.1
- old
+ new
@@ -1,11 +1,13 @@
class CsvExtended < Roo::CSV
+ def initialize(path)
+ super(path, csv_options: { col_sep: "," })
+ end
def foreach(sheet = nil, &block)
index = 1
- CSV.foreach(@filename, col_sep: ",") do |row|
+ CSV.foreach(@filename, csv_options) do |row|
yield(row, index)
index += 1
end
end
-
-end
\ No newline at end of file
+end