Method: InCSV::Database#db_path

Defined in:
lib/incsv/database.rb

#db_pathObject

Returns the path to the database file, generated based on the filename of the CSV passed to the class. For example, a CSV called ‘products.csv` will be stored in a database called `products.db` in the same directory.



44
45
46
47
# File 'lib/incsv/database.rb', line 44

def db_path
  path = Pathname(csv)
  (path.dirname + (path.basename(".csv").to_s + ".db")).to_s
end