README.md in cliutils-1.4.1 vs README.md in cliutils-1.4.2
- old
+ new
@@ -610,11 +610,11 @@
- prompt_text: What is the top story on espn.com?
config_key: top_story
config_section: app_data
pre:
message: 'I will now open espn.com in your default browser.'
- action: open_url
+ action: ~/.cliutils_plugins/open_url.rb
action_parameters:
- url: http://www.espn.com
post:
message: 'Thanks for inputting!'
validators:
@@ -641,13 +641,13 @@
end
```
Several items to note:
-1. The action class needs to be wrapped in the CLIUtils module.
+1. The action class needs to be wrapped in the CLIUtils module. In addition to "locking in" the action, this wrapper module gives easier access to PrettyIO, Messaging, etc.
2. The class name needs to be the camel-case version of the `action` key in the YAML.
3. The class name needs to end with "Action".
-4. The class needs to inherit from the PrefAction class. This allows it to have access to:
+4. The class needs to inherit from the PrefAction class. This allows the action to have access to:
* `@pref`: the Pref that implemented this action
5. The class needs to implement one method: `run(parameters = {})`
### Testing