You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`:filename`** (String, optional): Full path to configuration file to read. If not provided, the configuration file will be searched as described in [Configuration](/doc/configuration.md).
18
18
19
19
-**`:logger`** (Logger, optional): Logger object. If provided, debug messages and fatal errors will be logged to this object.
20
20
21
21
-**`:test`** (Boolean, optional): Test mode, defaults to false. If true, the value of the configuration settings will be logged to the logger (with priority DEBUG) and an exception will be raised if the configuration file cannot be located.
22
22
23
-
####Return value
23
+
## Return value
24
24
25
25
If the configuration file is located and valid, the return value is a Hash consisting of the options defined in the configuration file.
26
26
27
-
If the configuration file cannot be found, the return value is an empty Hash (`{}`). Except, if you specified`:test => true`, an exception will be raised.
27
+
If the configuration file cannot be found, the return value is an empty Hash (`{}`). Except, with`:test => true`, an exception will be raised.
Raised if the configuration file could not be parsed. A more specific error message will help identify the cause. Possible causes include the file not being valid ruby, the file not containing the expected structure or methods, or the method returning something other than a Hash.
33
+
Raised if the configuration file could not be evaluated. A more specific error message will help identify the cause. Possible causes include the file not being valid ruby, the file not containing the expected structure or methods, or the method returning something other than a Hash.
Raised if the configuration file could not be found, *and*`:test => true` was supplied.
37
+
Raised if the configuration file could not be found, *and*`:test => true` was supplied. (Note, if no configuration file is found, but `:test => false`, no error is raised, and `{}` is returned.)
0 commit comments