Docs: Updated rules.txt, now that design met reality.

This commit is contained in:
Paul Beckingham 2016-03-19 17:26:32 -04:00
parent 21f2b138b0
commit 6fa545f805

View file

@ -11,7 +11,7 @@ access configuration, exclusions, and tracking data.
Ref: http://martinfowler.com/bliki/RulesEngine.html Ref: http://martinfowler.com/bliki/RulesEngine.html
Instead of configuration, a rules system stores various settings and In addition to configuration, a rules system stores various settings and
configuration data as rules. There are several different types of rules, which configuration data as rules. There are several different types of rules, which
are loaded at launch time, and applied at various times during execution. are loaded at launch time, and applied at various times during execution.
@ -152,7 +152,7 @@ hierarchy for grouping:
name1 value1 name1 value1
group1: group1:
group2: group2:
name2 value2 name2=value2
In the example, value2 can be referred to by it's normalized name In the example, value2 can be referred to by it's normalized name
'group1.group2.name2'. 'group1.group2.name2'.
@ -161,8 +161,15 @@ An example is logging:
define configuration: define configuration:
logging: logging:
file: /path/to/log/file file=/path/to/log/file
categories: a b c !d categories=a b c !d
Initially, all settings are stored as simple name/value pairs at the top level
of the configuration files:
name=value
The hierarchy and 'configuration' rule will suupercede these.
Rule Type: Color Theme Rule Type: Color Theme
@ -200,13 +207,6 @@ There are several built-in functions, which may be used by rules:
- Need to distinguish between regular time and over time, with different rates - Need to distinguish between regular time and over time, with different rates
and limits. and limits.
- The general form is:
$ timew define A B C
define A
B C
- A nice feature would be to define a ':keyword' using the rules, which would - A nice feature would be to define a ':keyword' using the rules, which would
replace the notion of macros/aliases. replace the notion of macros/aliases.