File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ You have to first create your jamrules object, then you'll be able to call its f
1515``` javascript
1616
1717// initialisation of jamrules and its configurator
18- var rulesEngine = new jamrules ($ (' body' ));
18+ var rulesEngine = jamrules . build ($ (' body' ));
1919```
2020
2121## Define a set of objects
@@ -245,6 +245,28 @@ var anObject = {
245245rulesEngine .addObject (onObject);
246246```
247247
248+ ## _ addObject(anObject)
249+ Add an object to the list of objects to test against rules.
250+ This function differs from addObject in the way that all the jamrules will share the objects added this way.
251+ So, you include once your objects in the first jamrules object and then they will be processed by all the other rules.
252+
253+ ### parameters
254+ * anObject: a object to test in jamrule
255+
256+ ### Example
257+ ``` javascript
258+ var anObject = {
259+ propertiesSet : {
260+ object1Color : {
261+ white : 1
262+ },
263+ },
264+ matched : myMatchFunction,
265+ notmatched : null
266+ };
267+ rulesEngine ._addObject (onObject);
268+ ```
269+
248270## createRulesSet(aRulesGroup, ruleEvents)
249271Creates a rule set.
250272### parameters
You can’t perform that action at this time.
0 commit comments