module DBConfig
Public Instance Methods
get_config_path(dataset_path)
click to toggle source
# File lib/sqlloader/database.rb, line 49 def get_config_path(dataset_path) File.join(dataset_path, 'config.json') end
load_config(path)
click to toggle source
Generates a configuration hash from a JSON file
- path
-
the path to the dataset to load a config for
# File lib/sqlloader/database.rb, line 43 def load_config(path) require 'json' config = JSON.parse(File.read(self.get_config_path(path)), :symbolize_names => true) end