diff --git a/lib/ap.ex b/lib/ap.ex index abc83c0..96ce040 100644 --- a/lib/ap.ex +++ b/lib/ap.ex @@ -6,6 +6,6 @@ defmodule AP do end def ap(data, options // []) do - AP.Printer.print(data, options) + IO.puts AP.Format.format(data, options) end end diff --git a/lib/ap/printer.ex b/lib/ap/printer.ex deleted file mode 100644 index 4c8e713..0000000 --- a/lib/ap/printer.ex +++ /dev/null @@ -1,19 +0,0 @@ -defmodule AP.Printer do - use GenServer.Behaviour - import AP.Format - - def start_link(args // [], opts // []) do - :gen_server.start_link({:local, __MODULE__}, __MODULE__, args, opts) - end - - def print(data, opts) do - :gen_server.cast(__MODULE__, {:print, data, opts}) - end - - def init(_), do: { :ok, [] } - - def handle_cast({:print, data, opts}, state) do - format(data, opts) |> IO.puts - { :noreply, state } - end -end diff --git a/lib/ap/supervisor.ex b/lib/ap/supervisor.ex index 9c97c0a..2330727 100644 --- a/lib/ap/supervisor.ex +++ b/lib/ap/supervisor.ex @@ -7,7 +7,7 @@ defmodule AP.Supervisor do def init([]) do children = [ - worker(AP.Printer, []) + # worker(Ap.Worker, []) ] supervise(children, strategy: :one_for_one)