Ruleset
From KynetxDocs
A ruleset is a collection of Rules. In addition to rules, rulesets have:
- Name - any alphanumeric name is OK syntactically, but the name should match the ruleset ID you've been assigned. Intersekt ensures this is the case.
- Meta Block - information about the ruleset.
- description - A textual string that is returned when the describe method in the API is called.
- Dispatch Block - dispatches to other rulesets based on criteria like the domain of the calling page.
- Globals Block - definitions (usually emits) that will be available for all rules
Here is an example ruleset with a Meta Block and Dispatch Block:
// dispatch with some rules
ruleset 10 {
meta {
description <<
Ruleset for testing something or other.
>>
logging on
}
dispatch {
domain "www.google.com" -> "966337974";
domain "google.com" -> "966337974";
domain "www.circuitcity.com" -> "966337982";
}
rule testa is active {
select using "/test/" setting()
pre {
}
replace("test","test");
}
rule testb is active {
select using "/test/" setting()
pre {
}
replace("test","test");
}
}
