diff --git a/lib/annotated_interceptor.ex b/lib/annotated_interceptor.ex index b19803e..b5b796e 100644 --- a/lib/annotated_interceptor.ex +++ b/lib/annotated_interceptor.ex @@ -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 diff --git a/lib/interceptor.ex b/lib/interceptor.ex index aad5bf2..da043a4 100644 --- a/lib/interceptor.ex +++ b/lib/interceptor.ex @@ -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;