Skip to content

Commit

Permalink
Updated doc.Bumped version.
Browse files Browse the repository at this point in the history
  • Loading branch information
elmasse committed Jan 28, 2015
1 parent 4c07a2d commit 530d080
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://travis-ci.org/CocktailJS/cocktail-trait-advisable.svg?branch=master)](https://travis-ci.org/CocktailJS/cocktail-trait-advisable)
[![NPM version](https://badge.fury.io/js/cocktail-trait-advisable.png)](http://badge.fury.io/js/cocktail-trait-advisable)
[![npm version](https://badge.fury.io/js/cocktail-trait-advisable.svg)](http://badge.fury.io/js/cocktail-trait-advisable)

# cocktail-trait-advisable

Expand Down Expand Up @@ -83,13 +83,16 @@ this will be called after!

The following methods will be publicly available on the host class:

- `after(methodName, adviceFunction)`: Adds the adviceFunction to be called after the method.
- `after( methodName, adviceFunction, [scope] )`: Adds the adviceFunction to be called after the method.
- **methodName** {String}: The method name in the host class.
- **adviceFunction** {Function}: the function to be called. It receives the same parameters as the method.
- `before(methodName, adviceFunction)`: Adds the adviceFunction to be called before the method.
- **adviceFunction** {String|Function}: the function or the name of the function to be called. It receives the same parameters as the method.
- **scope** {Object} the scope to execute the adviceFunction. Optional.
- `before( methodName, adviceFunction, [scope] )`: Adds the adviceFunction to be called before the method.
- **methodName** {String}: The method name in the host class.
- **adviceFunction** {Function}: the function to be called. It receives the same parameters as the method.
- `around(methodName, adviceFunction)`: Adds the adviceFunction to be called around the method.
- **adviceFunction** {String|Function}: the function or the name of the function to be called. It receives the same parameters as the method.
- **scope** {Object} the scope to execute the adviceFunction. Optional.
- `around( methodName, adviceFunction, [scope] )`: Adds the adviceFunction to be called around the method.
- **methodName** {String}: The method name in the host class.
- **adviceFunction** {Function}: the function to be called. It receives the method as the first parameter and then same parameters.

- **adviceFunction** {String|Function}: the function or the name of the function to be called. It receives the method as the first parameter and then same parameters.
- **scope** {Object} the scope to execute the adviceFunction. Optional.

15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cocktail-trait-advisable",
"version": "1.0.0",
"description": "",
"version": "1.0.1",
"description": "A CocktailJS Trait Extension to add AOP methods to the host class",
"main": "src/Advisable",
"scripts": {
"test": "grunt test"
Expand Down Expand Up @@ -32,5 +32,14 @@
"sinon-chai": "~2.3.1",
"sinon": "~1.6.0",
"grunt-cli": "~0.1.9"
}
},
"keywords": [
"aop",
"trait",
"cocktail",
"after",
"before",
"around",
"advice"
]
}

0 comments on commit 530d080

Please sign in to comment.