Taxonomy of a Rule
Throughout the Caster documentation, you will see references to rule
s, command
s, spec
s, action
s, extra
s, and default
s. These all refer to parts of a Rule, typically a Dragonfly MappingRule or a Caster MergeRule. Both are structured the same way, as depicted below.
spec
: This is what you say in order to invoke anaction
.action
: This is what happens when you speak aspec
. Examples include Dragonfly's Key, Text, and Function actions, or Caster's R, ContextSeeker, or AsynchronousAction actions.extra
: A sub-component of aspec
. Examples include Dragonfly's Dictation, IntegerRef, and Choice, or Caster's IntegerRefST and Boolean.default
: A default value for anextra
. Optionalextra
s in aspec
should have default values.command
: The combination of aspec
and anaction
. In MappingRules or MergeRules, these are key/value pairs, but a Dragonfly CompoundRule is also acommand
.rule
: Any of the classes which extend Dragonfly's Rule class, but most commonly, MappingRule and MergeRule.