Skip to content

Commit

Permalink
Small updates to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amalbuquerque committed Sep 4, 2019
1 parent a9253c3 commit a623adf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/annotated_interceptor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ defmodule Interceptor.Annotated do
This module allows you to intercept your functions using `@intercept true`
"annotations", instead of having to use the `Interceptor.intercept/1` macro.
Using the `Interceptor.Annotated` module on the example `Intercepted` module
(defined on the `Interceptor` module documentation) looks like this:
This is how you can use the `Interceptor.Annotated` module on the example
`Intercepted` module (defined on the `Interceptor` module documentation):
```
defmodule Intercepted do
Expand Down
5 changes: 5 additions & 0 deletions lib/interceptor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ defmodule Interceptor do
end
```
_Note1:_ If you don't like to use the `Interceptor.intercept/1` block, you
can annotate your functions with `@intercept true` and use the
`Interceptor.Annotated` module. Please check the `Interceptor.Annotated`
module documentation for more information.
In the previous example, we defined four callbacks:
- a `before` callback, that will be called before the intercepted function starts;
Expand Down

0 comments on commit a623adf

Please sign in to comment.