Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: BjRo/apex
base: 1edd49ec0f
...
head fork: BjRo/apex
compare: 6c8cceea1d
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 2 additions and 42 deletions.
  1. +1 −7 lib/ap.ex
  2. +0 −19 lib/ap/printer.ex
  3. +0 −15 lib/ap/supervisor.ex
  4. +1 −1  mix.exs
8 lib/ap.ex
View
@@ -1,11 +1,5 @@
defmodule AP do
- use Application.Behaviour
-
- def start(_type, _args) do
- AP.Supervisor.start_link
- end
-
def ap(data, options // []) do
- AP.Printer.print(data, options)
+ IO.puts(AP.Format.format(data, options))
end
end
19 lib/ap/printer.ex
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
15 lib/ap/supervisor.ex
View
@@ -1,15 +0,0 @@
-defmodule AP.Supervisor do
- use Supervisor.Behaviour
-
- def start_link do
- :supervisor.start_link(__MODULE__, [])
- end
-
- def init([]) do
- children = [
- worker(AP.Printer, [])
- ]
-
- supervise(children, strategy: :one_for_one)
- end
-end
2  mix.exs
View
@@ -9,7 +9,7 @@ defmodule AP.Mixfile do
end
def application do
- [mod: { AP, [] }]
+ []
end
defp deps do

No commit comments for this range

Something went wrong with that request. Please try again.