README.md in cliutils-1.0.7 vs README.md in cliutils-1.1.0
- old
+ new
@@ -176,11 +176,11 @@
For instance, let's say you wanted to log a few messages to both your user's STDOUT and to `file.txt`:
```Ruby
messenger.info('This should only appear in STDOUT.')
-#messenger.attach takes a Hash of string/symbol keys
+# messenger.attach takes a Hash of string/symbol keys
# and Logger values (so you can refer to them later on).
messenger.attach(MY\_FILE\_LOGGER: Logger.new('file.txt'))
messenger.warn('This warning should appear in STDOUT and file.txt')
messenger.error('This error should appear in STDOUT and file.txt')
@@ -325,9 +325,17 @@
```Ruby
configuration.ingest(prefs)
configuration.save
```
+
+Note that you can also initialize a `Prefs` object with a Configurator:
+
+```Ruby
+prefs = CLIUtils::Prefs.new('path/to/yaml/file', my_configurator)
+```
+
+In this case, `Prefs` will look to see if any values already exist for a specific prompt; if so, that value will be used as the default, rather than the default specified in the YAML.
### Why a Prefs Class?
I've written apps that need to request user input at various times for multiple different things; as such, I thought it'd be easier to have those scenarios chunked up. You can always wrap `Prefs` into a module singleton if you wish.