From 68967b1e630a3e77d4c0b1a4249a7890d14c3481 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Fri, 2 Oct 2015 20:45:53 +0200 Subject: [PATCH] Comment Ecto.Type module generating code --- lib/isn.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/isn.ex b/lib/isn.ex index d36b171..007453e 100644 --- a/lib/isn.ex +++ b/lib/isn.ex @@ -55,9 +55,12 @@ defmodule Isn do do: binary end +# Generate Ecto.Type modules for all supported data types in the `isn` +# postgresql module. for module <- ~w(ISBN ISMN ISSN ISBN13 ISMN13 ISSN13 UPC EAN13) do module_name = Module.concat([Isn, module]) ecto_type = module |> String.downcase |> String.to_atom + defmodule module_name do @behaviour Ecto.Type