class ExcelUtils::Sheets::CSV
Attributes
filename[R]
Public Class Methods
new(filename:, **options)
click to toggle source
Calls superclass method
ExcelUtils::Sheets::Base::new
# File lib/excel_utils/sheets/csv.rb, line 5 def initialize(filename:, **options) super(**options) @filename = filename end
Private Instance Methods
each_row() { |row| ... }
click to toggle source
# File lib/excel_utils/sheets/csv.rb, line 18 def each_row first = true NesquikCSV.foreach(filename) do |row| yield row unless first first = false end end
first_row()
click to toggle source
# File lib/excel_utils/sheets/csv.rb, line 14 def first_row NesquikCSV.open(filename) { |csv| csv.readline } || [] end