Add helper methods to create the tuples `{:ok, socket}` and `{:noreply, socket}`, and make them available in `SlaxWeb` module.
10 lines
209 B
Elixir
10 lines
209 B
Elixir
defmodule SlaxWeb.SocketHelpers do
|
|
@moduledoc """
|
|
Helper functions to encapsulate a socket into proper tuples.
|
|
"""
|
|
|
|
def ok(socket), do: {:ok, socket}
|
|
|
|
def noreply(socket), do: {:noreply, socket}
|
|
end
|