Some tidying up
This commit is contained in:
parent
81922adc70
commit
933c15a671
|
|
@ -42,7 +42,7 @@ defmodule Isn do
|
||||||
def init(parameters, _opts),
|
def init(parameters, _opts),
|
||||||
do: parameters
|
do: parameters
|
||||||
|
|
||||||
def matching(_library),
|
def matching(_),
|
||||||
do: Enum.zip(Stream.cycle([:type]), @isn)
|
do: Enum.zip(Stream.cycle([:type]), @isn)
|
||||||
|
|
||||||
def format(_),
|
def format(_),
|
||||||
|
|
@ -81,8 +81,6 @@ for module <- ~w(ISBN ISMN ISSN ISBN13 ISMN13 ISSN13 UPC EAN13) do
|
||||||
|
|
||||||
def type, do: unquote(ecto_type)
|
def type, do: unquote(ecto_type)
|
||||||
|
|
||||||
defdelegate blank?, to: Ecto.Type
|
|
||||||
|
|
||||||
def cast(nil), do: :error
|
def cast(nil), do: :error
|
||||||
def cast(isn), do: {:ok, to_string(isn)}
|
def cast(isn), do: {:ok, to_string(isn)}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue