Module: SimpleCSV::Extension
Overview
All methods of module SimpleCSV::Extension are extended & included by SimpleCSV. For example, you can use SimpleCSV.parse_file SimpleCSV#parse_file.
Instance Method Summary collapse
-
#parse_file(file_name, options = nil, &block) ⇒ Object
Parse csv file.
Instance Method Details
#parse_file(file_name, options = nil, &block) ⇒ Object
Parse csv file. See SimpleCSV.parse for details.
Parameters
- file_name
-
String: csv file name. - options
-
Integer: parser options. - row
-
ArrayofStrings : parsed data.
13 14 15 16 17 |
# File 'lib/simplecsv/extension.rb', line 13 def parse_file(file_name, = nil, &block) File.foreach(file_name, ) do |line| parse(line, &block) end end |