0
我做了$..class
,它顯示它是一個Fixnum,但我不確定該值是如何派生的。這裏是部分片段
csv_files.each do |csv_file|
method, year, currency_col = nil, nil, nil
CSV.foreach(csv_file, headers: true) do |row|
if $. == 2
method_col, year_col, currency_col = "Method", "Year", "Correct Currency"
method_col2, year_col2 = "Quotation Method", "Fiscal Year"
validate_headers(csv_file, row, [method_col, year_col, currency_col], [method_col2, year_col2, currency_col])
method = row[method_col] || row[method_col2]
year = row[year_col] || row[year_col2]
end