Module: SCAnalytics::Connections::Credentials
- Includes:
- SCAnalytics
- Defined in:
- lib/sc_analytics/connections/credentials.rb
Constant Summary
collapse
- CONFIGS_FILE =
"G:/Rowan/db_configs.yml"
Constants included
from SCAnalytics
VERSION
Class Method Summary
collapse
#alert, #open_excel_file, #quit_excel, #run_excel_macro, #run_in_parallel, #run_query
Class Method Details
.connection_details(db_name) ⇒ Object
26
27
28
|
# File 'lib/sc_analytics/connections/credentials.rb', line 26
def self.connection_details(db_name)
@credentials[db_name.downcase.to_sym]
end
|
.connection_type(db_name) ⇒ Object
22
23
24
|
# File 'lib/sc_analytics/connections/credentials.rb', line 22
def self.connection_type(db_name)
@credentials[db_name.downcase.to_sym][:type].downcase
end
|
.symbolize_keys_for(hsh) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/sc_analytics/connections/credentials.rb', line 10
def self.symbolize_keys_for(hsh)
hsh = hsh.inject({}) {|new_hsh,(k,v)| new_hsh[k.downcase.to_sym] = v; new_hsh}
hsh.keys.each do |k|
hsh[k] = symbolize_keys_for hsh[k] if hsh[k].is_a? Hash
end
hsh
end
|