Sha256: a387cbddbc73b53ed12b6c1f88be3319bebb27ccc00bd71c46c22fd5808cf520
Contents?: true
Size: 715 Bytes
Versions: 29
Compression:
Stored size: 715 Bytes
Contents
require 'csv' module Eco class CSV < ::CSV class << self # @return [Eco::CSV::Table] def parse(data, **kargs, &block) kargs = {headers: true, skip_blanks: true}.merge(kargs) Eco::CSV::Table.new(super(data, **kargs, &block)) end # @return [Eco::CSV::Table] def read(file, **kargs) kargs = {headers: true, skip_blanks: true}.merge(kargs) args = [file].tap do |arg| encoding = Eco::API::Common::Session::FileManager.encoding(file) arg.push("rb:bom|utf-8") if encoding == "bom" end Eco::CSV::Table.new(super(*args, **kargs)) end end end end require_relative 'csv/table'
Version data entries
29 entries across 29 versions & 1 rubygems