Class: Utilio::Database
- Inherits:
-
Object
- Object
- Utilio::Database
- Defined in:
- lib/utilio/database.rb
Constant Summary collapse
- DEFAULT_OPTS =
{ :environment => nil, :file => 'config/database.yml' }
Class Method Summary collapse
-
.config(options = {}) ⇒ Object
Load the configuration file from your application root.
Class Method Details
.config(options = {}) ⇒ Object
Load the configuration file from your application root
13 14 15 16 17 18 19 20 21 |
# File 'lib/utilio/database.rb', line 13 def config ={} = DEFAULT_OPTS.merge() config = Path.yaml_file([:file]) unless [:environment].nil? || [:environment].empty? config[[:environment]] else config end end |