antivanov/jsAspect — pull request #6 by konstantinkrassmann (2014-04-10 09:43:29+00:00)
Title: Enable by setting to advice inherited methods.

__Enable by setting to advice inherited methods__:
A possible szenario is, that i want to advice all inherited methods.
This is now possible by setting a flag:

``` javascript
var LoggerAspect = new jsAspect.Aspect(beforeAdvice, afterAdvice);
LoggerAspect.settings.adviceInheritedMethods = true;
LoggerAspect.applyTo(Child);
```

Maybe move the setting into the `applyTo` method:

``` javascript
LoggerAspect.applyTo(Child, {
adviceInheritedMethods: true
});
```
But maybe you want to set this setting at the aspect itself and apply it to multiple Objects/Constructors.
_See the test_: "jsAspect.applyAdvice: Apply aspect with inheritance" in _test.multiple.advice_. (Maybe move the test into other/new file.)

__Rename all constant values to uppercase__:
This is required, to make clear, that these are readonly constant values.
It's a best practice in most languages.
IDEs or browsers can then autocomplete the input of the user when typing `jsAspect.` and the jsHint will stop crying, because it doesnt know the variable `pointcut.>>method<<`.

__Few fixes and changes, to make jsLint happy__

__Changes to method interfaces__:

- `inject`: Did take 5 parameters, while the last parameter `methodName` just got ignored, if the point_cut wasn't `METHOD`.
To apply settings, this last parameter can be a string or an object.
If it's an object -> it's a setting otherwise, it's the actual method name.
Since the `POINT_CUT.METHOD` doens't have any settings yet, we won't pass one more parameter.