mix phx.new hello creates
defmodule HelloWeb.HelloController do
use HelloWeb, :controller
def world(conn, _params) do
HelloWeb visible in this module? There are statement that includes it. Is it the
HelloWeb module in
hello_web.ex? Please explain.
What do you mean by visible? A module name (
HelloWeb) is just an atom, so it’s visible everywhere it is written like any other literal value (ints, strings).
defmacro __using__(which) when is_atom(which) do
apply(__MODULE__, which, )
A macro definition, it effectively delegates to the function that is described through the passed in atom when called.