Maru v0.12.0 Maru.Builder View Source
Generate functions.
For all modules:
Two functions will be generated.
`__routes__/0` for returning routes.
`endpoint/2` for execute endpoint block.
For plug modules:
You can define a plug module by `use Maru.Router, make_plug: true` or
`config :maru, MyPlugModule` within config.exs.
Two functions `init/1` and `call/2` will be generated for making this module
a [`Plug`](https://hexdocs.pm/plug/1.4.1/Plug.html). The function `endpoint/2` will be called by this [`Plug`](https://hexdocs.pm/plug/1.4.1/Plug.html).