We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcf6a63 commit 114165bCopy full SHA for 114165b
lib/rubycas-server-core/settings.rb
@@ -11,9 +11,12 @@ module Settings
11
@_settings = HashWithIndifferentAccess.new
12
attr_reader :_settings
13
14
- def load!(file_name)
15
- config = YAML::load_file(file_name).with_indifferent_access
16
- @_settings.merge!(config)
+ def load!(config)
+ if config.is_a? String
+ config = YAML::load_file(config).with_indifferent_access
17
+ elsif config.is_a? Hash
18
+ @_settings.merge!(config)
19
+ end
20
end
21
22
def method_missing(name, *args, &block)
0 commit comments