def initialize(name_or_hash = Config.settings_file)
case name_or_hash
when Hash
self._settings = name_or_hash
when String, Symbol
root_path = defined?(RestfulX::Configuration::APP_ROOT) ? "#{RestfulX::Configuration::APP_ROOT}/config/" : ""
file_path = name_or_hash.is_a?(Symbol) ? "#{root_path}#{name_or_hash}.yml" : name_or_hash
self._settings = YAML.load(ERB.new(File.read(file_path)).result)
self._settings = _settings[RAILS_ENV] if defined?(RAILS_ENV)
else
raise ArgumentError.new("Your settings must be a hash,
a symbol representing the name of the .yml file in your config directory,
or a string representing the abosolute path to your settings file.")
end
define_settings!
end