Skip to content

Commit

Permalink
Slightly improve the documentation for StreamData.atom/1
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
whatyouhide committed Mar 27, 2019
1 parent a08cb7c commit 349f320
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/stream_data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1730,12 +1730,15 @@ defmodule StreamData do
`kind` can be:
* `:alphanumeric` - this generates atoms that don't need to be quoted when written as literals.
For example, it will generate `:foo` but not `:"foo bar"`.
* `:alphanumeric` - this generates alphanumeric atoms that don't need to be quoted when
written as literals. For example, it will generate `:foo` but not `:"foo bar"`.
* `:operator` - this generates Elixir operators (such as `:<>` or `:+`). These don't
need to be quoted when written as literals.
* `:alias` - generates Elixir aliases like `Foo` or `Foo.Bar.Baz`.
These are the most common kinds of atoms usually used in Elixir applications. If you
These are some of the most common kinds of atoms usually used in Elixir applications. If you
need completely arbitrary atoms, you can use a combination of `map/2`, `String.to_atom/1`,
and string-focused generators to transform arbitrary strings into atoms:
Expand Down

0 comments on commit 349f320

Please sign in to comment.