Skip to content

Commit 42ffd31

Browse files
author
José Valim
committed
Record docs adjustments
1 parent 7aeb1b6 commit 42ffd31

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

lib/elixir/lib/record.ex

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ defmodule Record do
7777
example, is only available inside the `User` module and nowhere else.
7878
You can find more information in `Kernel.defrecordp/2` docs.
7979
80-
In general, though, records are used as part of a module's public
81-
interface. For such use cases, Elixir provides record modules.
82-
8380
## defrecord
8481
8582
By using `defrecord`, a developer can make a Record definition
@@ -97,7 +94,7 @@ defmodule Record do
9794
user() #=> User[name: "José", age: 25]
9895
user(age: 26) #=> User[name: "José", age: 26]
9996
100-
Notice that now, since the record definition is accessible, Elixir
97+
Notice that now since the record definition is accessible, Elixir
10198
shows the record nicely formatted, no longer as a simple tuple. We
10299
can get the raw formatting by passing `raw: true` to `inspect`:
103100
@@ -112,9 +109,9 @@ defmodule Record do
112109
User[] #=> User[name: "José", age: 25]
113110
User[age: 26] #=> User[name: "José", age: 26]
114111
115-
The macro name is replaced by the module name and the parenthesis
116-
are replaced by brackets. When the shortcut syntax is used, there
117-
is no need to import the record.
112+
The macro name is replaced by the module name and the parentheses
113+
are replaced by brackets. When this syntax is used, there is no
114+
need to import the record.
118115
119116
Before we sum up the differences between `defrecord` and
120117
`defrecordp`, there is one last functionality introduced by
@@ -175,7 +172,7 @@ defmodule Record do
175172
to_string WeekDate[year: 2013, week: 26, week_day: 4]
176173
"2013-W26-4"
177174
178-
A protocol can be implemented for any record defined via `defrecord`.
175+
A protocol can be implemented for any record.
179176
"""
180177

181178
@type t :: tuple

0 commit comments

Comments
 (0)