cover/Elixir.Elita.Ready.html

1 defmodule Elita.Ready do
2 import :ets, only: [insert: 2, lookup: 2, whereis: 1]
3
4 1 def up, do: insert(:elita_vault, {:ready, true})
5
6
:-(
def ready?, do: check(whereis(:elita_vault))
7
8
:-(
defp check(:undefined), do: false
9
10
:-(
defp check(_), do: lookup(:elita_vault, :ready) == [ready: true]
11 end
Line Hits Source