Skip to content

Commit 4e27c8e

Browse files
committed
readme
1 parent 5d037e4 commit 4e27c8e

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff 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 = {
245245
rulesEngine.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)
249271
Creates a rule set.
250272
### parameters

0 commit comments

Comments
 (0)