troll.ex 366 B

12345678910111213141516
  1. defmodule Fourletters.Troll do
  2. use Supervisor
  3. def start_link(arg) do
  4. Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
  5. end
  6. @impl true
  7. def init(_arg) do
  8. children = [
  9. # initial case, not required
  10. %{id: :butt, start: {ABCD.Fourletters, :start_link, [["yo"]]}}
  11. ]
  12. Supervisor.init(children, strategy: :one_for_one)
  13. end
  14. end