docs: Add clarifying language around the use of the Enum module (#340)

This commit is contained in:
Theo Harris 2022-06-01 00:18:42 +10:00 committed by GitHub
parent 067228980e
commit 4aac381cb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,14 +2,14 @@ defmodule Ash.Type.Enum do
@moduledoc """
A type for abstracting enums into a single type.
For example, you might have:
For example, your existing app might look like:
```elixir
attribute :status, :atom, constraints: [one_of: [:open, :closed]]
```
But as that starts to spread around your system you may find that you want
to centralize that logic. To do that, use this module to define an Ash type
easily.
easily:
```elixir
defmodule MyApp.TicketStatus do