Permalink
Browse files

Revert "Using a separate process"

This reverts commit 1edd49e.
  • Loading branch information...
1 parent 1edd49e commit ae8a2e390479d7ac4bac95259091ce04a38ce963 @BjRo committed Jan 19, 2014
Showing with 2 additions and 21 deletions.
  1. +1 −1 lib/ap.ex
  2. +0 −19 lib/ap/printer.ex
  3. +1 −1 lib/ap/supervisor.ex
View
@@ -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
View
@@ -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
View
@@ -7,7 +7,7 @@ defmodule AP.Supervisor do
def init([]) do
children = [
- worker(AP.Printer, [])
+ # worker(Ap.Worker, [])
]
supervise(children, strategy: :one_for_one)

0 comments on commit ae8a2e3

Please sign in to comment.