class ConfigReader::EnvConfigReader
Constants
- DEFAULT_KEY
Public Class Methods
new(config)
click to toggle source
Calls superclass method
# File lib/configreader/env_configreader.rb, line 14 def initialize(config) config_data = load_config(config) env_data = config_data[Rails.env] || {} default_data = config_data[DEFAULT_KEY] || {} super(default_data) self.deep_merge!(env_data) raise EnvironmentNotFoundInYaml.new(Rails.env) if self.empty? end