Skip to content

Commit

Permalink
docs: add @behaviour attribute to example modules
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth committed May 18, 2024
1 parent 0b58ea8 commit 69110cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ defmodule Plug do
Here's an example of a module plug:
defmodule JSONHeaderPlug do
@behaviour #{inspect(__MODULE__)}
import Plug.Conn
def init(opts) do
Expand Down Expand Up @@ -143,6 +145,8 @@ defmodule Plug do
## Example
defmodule Router do
@behaviour #{inspect(__MODULE__)}
def init(opts), do: opts
def call(conn, opts) do
Expand Down

0 comments on commit 69110cf

Please sign in to comment.