class Kiba::Uncommon::Sources::CSV

Attributes

input_file[R]

Public Class Methods

new(input_file) click to toggle source
# File lib/kiba/uncommon/sources/csv.rb, line 9
def initialize(input_file)
  @input_file = input_file
end

Public Instance Methods

each() { |to_hash| ... } click to toggle source
# File lib/kiba/uncommon/sources/csv.rb, line 13
def each
  ::CSV.foreach(input_file, headers: true, header_converters: :symbol) do |row|
    yield(row.to_hash)
  end
end