working on docs..

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-08-23 18:59:19 +03:00
parent b245275733
commit 05c411e7ba

View File

@ -55,7 +55,46 @@ code.
### The main entities: ### The main entities:
```javascript
// Action set...
var Base = Actions({
get value(){
return this.__value || 0
},
set value(val){
this.__value = val
},
print: [function(){
console.log(this.value)
}],
times: ['get value',
function(n){
this.value *= n
return this.value
}],
})
var Extending = Actions(Base, {
times: [function(n){
console.log(this.value, 'times', n, 'is:')
return function(result, n){
console.log(' ', this.value)
}
}]
})
```
**Action set** **Action set**
- an object containing a number of actions, - an object containing a number of actions,
- optionally, directly or indirectly inherited from `MetaActions` - optionally, directly or indirectly inherited from `MetaActions`
and/or other action sets, and/or other action sets,