philomena/lib/philomena_web/views/ip_profile_view.ex

9 lines
174 B
Elixir
Raw Normal View History

2019-12-08 02:49:28 +01:00
defmodule PhilomenaWeb.IpProfileView do
use PhilomenaWeb, :view
@spec ipv6?(Postgrex.INET.t()) :: boolean()
def ipv6?(ip) do
tuple_size(ip.address) == 8
end
2019-12-08 02:49:28 +01:00
end