Class: Vayacondios::Server::Configuration
- Inherits:
-
Configuration
- Object
- Configuration
- Vayacondios::Server::Configuration
- Defined in:
- lib/vayacondios/server/configuration.rb
Instance Attribute Summary
Attributes inherited from Configuration
Instance Method Summary collapse
Methods inherited from Configuration
#[], #apply_all, #global, #initialize, #overlay, #project, #resolve!, #resolved?, #resolved_settings
Constructor Details
This class inherits a constructor from Vayacondios::Configuration
Instance Method Details
#defaults ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vayacondios/server/configuration.rb', line 4 def defaults %w[development test production].inject({}) do |default_conf, type| default_conf[type.to_sym] = {} default_conf[type.to_sym][:database] = { driver: 'mongo', host: 'localhost', port: 27017, name: "vayacondios_#{type}", connections: 20, } default_conf end end |
#env(handle = nil) ⇒ Object
18 19 20 21 |
# File 'lib/vayacondios/server/configuration.rb', line 18 def env(handle = nil) handle ||= :development resolved_settings[handle.to_sym] || {} end |