type.ex 146 Bytes
Newer Older
1
2
defmodule Grains.Type do

3
  @nr_types 1
4
5
6
7
8
9
10

  def select_type(uuid) do
    {i, _} = Integer.parse(uuid, 16)
    Integer.mod(i, @nr_types)
  end

end