Skip to content

Commit 68c9a28

Browse files
committed
Cleaning up Module docs
1 parent 30c9af3 commit 68c9a28

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

lib/elixir/lib/module.ex

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ defmodule Module do
6969
@before_compile A
7070
end
7171
72-
* `@behaviour` (notice the british spelling)
72+
* `@behaviour` (notice the British spelling)
7373
7474
Specify an OTP or user-defined behaviour.
7575
@@ -183,7 +183,7 @@ defmodule Module do
183183
When just a module is provided, the function is assumed to be
184184
`__on_definition__/6`.
185185
186-
Note that you can\'t provide the current module to `@on_definition`
186+
Note that you can't provide the current module to `@on_definition`
187187
because the hook function will not be defined in time. Finally, since
188188
the `on_definition` hook is executed inside the context of the defined
189189
function (i.e. `env.function` returns the current function), the hook
@@ -298,7 +298,7 @@ defmodule Module do
298298
299299
In addition to the above, you may also pass to `__info__/1` any atom supported
300300
by Erlang's `module_info` function which also gets defined for each compiled
301-
module. See http://erlang.org/doc/reference_manual/modules.html#id74571 for
301+
module. See http://erlang.org/doc/reference_manual/modules.html#id69430 for
302302
more information.
303303
"""
304304
def __info__(kind)
@@ -359,9 +359,9 @@ defmodule Module do
359359
end
360360
361361
@doc """
362-
Creates a module with the given name and given by
362+
Creates a module with the given name and defined by
363363
the given quoted expressions. The line where the module
364-
is defined and its file can be given as options.
364+
is defined and its file can be passed as options.
365365
366366
## Examples
367367
@@ -374,7 +374,7 @@ defmodule Module do
374374
375375
Hello.world #=> true
376376
377-
## Differences with `defmodule`
377+
## Differences from `defmodule`
378378
379379
`Module.create` works similarly to `defmodule` and
380380
return the same results. While one could also use
@@ -398,7 +398,7 @@ defmodule Module do
398398
end
399399
400400
@doc """
401-
Concatenates the list of aliases and returns a new alias.
401+
Concatenates a list of aliases and returns a new alias.
402402
403403
## Examples
404404
@@ -414,7 +414,7 @@ defmodule Module do
414414
end
415415
416416
@doc """
417-
Concatenates the two given aliases and returns a new alias.
417+
Concatenates two aliases and returns a new alias.
418418
419419
## Examples
420420
@@ -430,9 +430,9 @@ defmodule Module do
430430
end
431431
432432
@doc """
433-
Concatenates the list aliases and returns a new alias only
433+
Concatenates a list of aliases and returns a new alias only
434434
if the alias was already referenced. If the alias was not
435-
referenced yet, fails with ArgumentError.
435+
referenced yet, fails with `ArgumentError`.
436436
It handles char lists, binaries and atoms.
437437
438438
## Examples
@@ -450,9 +450,9 @@ defmodule Module do
450450
end
451451
452452
@doc """
453-
Concatenates the two aliases and returns a new alias only
453+
Concatenates two aliases and returns a new alias only
454454
if the alias was already referenced. If the alias was not
455-
referenced yet, fails with ArgumentError.
455+
referenced yet, fails with `ArgumentError`.
456456
It handles char lists, binaries and atoms.
457457
458458
## Examples
@@ -485,7 +485,7 @@ defmodule Module do
485485
@doc """
486486
Attaches documentation to a given function or type. It expects
487487
the module the function/type belongs to, the line (a non negative
488-
integer), the kind (def or defmacro), a tuple representing
488+
integer), the kind (`def` or `defmacro`), a tuple representing
489489
the function and its arity, the function signature (the signature
490490
should be omitted for types) and the documentation, which should
491491
be either a binary or a boolean.
@@ -584,7 +584,7 @@ defmodule Module do
584584
585585
@doc """
586586
Checks if the module defines the given function or macro.
587-
Use `defines?/3` to assert for an specific type.
587+
Use `defines?/3` to assert for a specific type.
588588
589589
## Examples
590590
@@ -602,8 +602,8 @@ defmodule Module do
602602
end
603603
604604
@doc """
605-
Checks if the module defines a function or macro with the
606-
given `kind`. `kind` can be either `:def`, `:defp`,
605+
Checks if the module defines a function or macro of the
606+
given `kind`. `kind` can be any of `:def`, `:defp`,
607607
`:defmacro` or `:defmacrop`.
608608
609609
## Examples
@@ -625,7 +625,7 @@ defmodule Module do
625625
end
626626
627627
@doc """
628-
Return all functions defined in the given module.
628+
Return all functions defined in `module`.
629629
630630
## Examples
631631
@@ -642,7 +642,7 @@ defmodule Module do
642642
end
643643
644644
@doc """
645-
Returns all functions defined in the given module according
645+
Returns all functions defined in `module`, according
646646
to its kind.
647647
648648
## Examples
@@ -661,7 +661,7 @@ defmodule Module do
661661
end
662662
663663
@doc """
664-
Makes the given functions in the given module overridable.
664+
Makes the given functions in `module` overridable.
665665
An overridable function is lazily defined, allowing a
666666
developer to customize it. See `Kernel.defoverridable` for
667667
more information and documentation.
@@ -694,7 +694,7 @@ defmodule Module do
694694
end
695695
696696
@doc """
697-
Returns true if the given tuple in module is marked as overridable.
697+
Returns `true` if `tuple` in `module` is marked as overridable.
698698
"""
699699
def overridable?(module, tuple) do
700700
!!List.keyfind(get_attribute(module, :__overridable), tuple, 0)
@@ -789,7 +789,7 @@ defmodule Module do
789789
end
790790
791791
@doc """
792-
Deletes all attributes that matches the given key.
792+
Deletes all attributes that match the given key.
793793
794794
## Examples
795795
@@ -821,7 +821,7 @@ defmodule Module do
821821
* `:persist` - The attribute will be persisted in the Erlang
822822
Abstract Format. Useful when interfacing with Erlang libraries.
823823
824-
By default, both options are false.
824+
By default, both options are `false`.
825825
826826
## Examples
827827

0 commit comments

Comments
 (0)