Extract display into supervision tree.
This commit is contained in:
15
lib/elixir_koans.ex
Normal file
15
lib/elixir_koans.ex
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule ElixirKoans do
|
||||
use Application
|
||||
alias Options
|
||||
|
||||
def start(_type, _args) do
|
||||
import Supervisor.Spec
|
||||
|
||||
children = [
|
||||
worker(Display, [])
|
||||
]
|
||||
|
||||
opts = [strategy: :one_for_one, name: ElixirKoans.Supervisor]
|
||||
Supervisor.start_link(children, opts)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user