Class: ActiveGeoDb::ConnectionConfiguration
- Inherits:
-
Object
- Object
- ActiveGeoDb::ConnectionConfiguration
- Includes:
- Singleton
- Defined in:
- lib/active_geo_db/connection_configuration.rb
Constant Summary collapse
- CONFIGURATION_KEY =
Key in Rails database configuration under which the configuration for OpenGeoDb database can be found
"open_geo_db"
Instance Method Summary collapse
-
#load_file(path) ⇒ Object
Read configuration file and load appropriate section.
-
#to_hash ⇒ Object
Return previously loaded configuration.
Instance Method Details
#load_file(path) ⇒ Object
Read configuration file and load appropriate section
13 14 15 |
# File 'lib/active_geo_db/connection_configuration.rb', line 13 def load_file(path) @configuration_data = YAML.load_file(path)[CONFIGURATION_KEY] end |
#to_hash ⇒ Object
Return previously loaded configuration
18 19 20 |
# File 'lib/active_geo_db/connection_configuration.rb', line 18 def to_hash @configuration_data end |