diff options
author | Jeff Weiss <jeff.weiss@puppetlabs.com> | 2016-03-29 22:04:43 -0700 |
---|---|---|
committer | Jeff Weiss <jeff.weiss@puppetlabs.com> | 2016-03-29 22:04:43 -0700 |
commit | 2fbe1c9c20a600d16fdde381b0310bd3cb2edb3d (patch) | |
tree | 79a81ba0e25c001193f9cb3f58c571865819d255 /lib/exirc/exirc.ex | |
parent | Merge pull request #42 from Annwenn/master (diff) |
prefer Elixir module variants over Erlang ones
Prior to this commit exirc used `:gen_server` and `:supervisor` over
the Elixir variants `GenServer` and `Supervisor`, respectively. The
commit changes to modules to the Elixir variants mostly to reduce the
cognitive load on contributors, particularly those who are not yet well
versed in Erlang.
Diffstat (limited to 'lib/exirc/exirc.ex')
-rw-r--r-- | lib/exirc/exirc.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/exirc/exirc.ex b/lib/exirc/exirc.ex index 719c9ed..cfa2654 100644 --- a/lib/exirc/exirc.ex +++ b/lib/exirc/exirc.ex @@ -41,7 +41,7 @@ defmodule ExIrc do """ @spec start! :: {:ok, pid} | {:error, term} def start! do - :supervisor.start_link({:local, :exirc}, __MODULE__, []) + Supervisor.start_link(__MODULE__, [], name: :exirc) end @doc """ @@ -50,7 +50,7 @@ defmodule ExIrc do @spec start_client! :: {:ok, pid} | {:error, term} def start_client! do # Start the client worker - :supervisor.start_child(:exirc, []) + Supervisor.start_child(:exirc, []) end ############## |