lib/csvsql/db.rb in csvsql-0.1.1 vs lib/csvsql/db.rb in csvsql-0.1.2

- old
+ new

@@ -1,17 +1,17 @@ # frozen_string_literal: true require 'digest' +require 'fileutils' class Csvsql::Db BATCH_ROWS = 10000 CACHE_DIR = File.join(Dir.home, '.csvsql_cache') FileUtils.mkdir_p(CACHE_DIR) unless Dir.exists?(CACHE_DIR) attr_reader :use_cache, :csv_path, :csv_io, :db, :batch_rows def self.clear_cache! - require 'fileutils' FileUtils.rm_f(Dir.glob(File.join(CACHE_DIR, '*'))) end def initialize(use_cache: false, batch_rows: nil) @db = nil