module Db2Query::Config::ClassMethods
Public Instance Methods
default_path()
click to toggle source
# File lib/db2_query/config.rb, line 17 def default_path "#{Rails.root}/config/db2query.yml" end
load_database_configurations(path = nil)
click to toggle source
# File lib/db2_query/config.rb, line 21 def load_database_configurations(path = nil) config_file = IO.read(path || default_path) @@configurations = YAML.load(config_file)[DEFAULT_ENV.call].transform_keys(&:to_sym) rescue Exception => e raise Db2Query::Error, e.message end