diff --git a/lib/exw3.ex b/lib/exw3.ex index cbfea36..020a841 100644 --- a/lib/exw3.ex +++ b/lib/exw3.ex @@ -40,6 +40,8 @@ defmodule ExW3 do @unit_map end + @spec to_wei(integer(), keyword()) :: integer() + @doc "Converts the value to whatever unit key is provided. See unit map for details." def to_wei(num, key) do if @unit_map[key] do num * @unit_map[key] @@ -48,6 +50,8 @@ defmodule ExW3 do end end + @spec from_wei(integer(), keyword()) :: integer() + @doc "Converts the value to whatever unit key is provided. See unit map for details." def from_wei(num, key) do if @unit_map[key] do num / @unit_map[key] diff --git a/mix.exs b/mix.exs index 917ab12..907cf88 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule ExW3.MixProject do def project do [ app: :exw3, - version: "0.4.1", + version: "0.4.2", elixir: "~> 1.7.2", build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod,