@@ -489,9 +489,10 @@ defmodule Module do
489
489
end
490
490
491
491
@ doc """
492
- Concatenates a list of aliases and returns a new alias only
493
- if the alias was already referenced. If the alias was not
494
- referenced yet, fails with `ArgumentError`.
492
+ Concatenates a list of aliases and returns a new alias only if the alias
493
+ was already referenced.
494
+
495
+ If the alias was not referenced yet, fails with `ArgumentError`.
495
496
It handles char lists, binaries and atoms.
496
497
497
498
## Examples
@@ -509,9 +510,10 @@ defmodule Module do
509
510
end
510
511
511
512
@ doc """
512
- Concatenates two aliases and returns a new alias only
513
- if the alias was already referenced. If the alias was not
514
- referenced yet, fails with `ArgumentError`.
513
+ Concatenates two aliases and returns a new alias only if the alias was
514
+ already referenced.
515
+
516
+ If the alias was not referenced yet, fails with `ArgumentError`.
515
517
It handles char lists, binaries and atoms.
516
518
517
519
## Examples
@@ -529,9 +531,10 @@ defmodule Module do
529
531
end
530
532
531
533
@ doc """
532
- Attaches documentation to a given function or type. It expects
533
- the module the function/type belongs to, the line (a non negative
534
- integer), the kind (`def` or `defmacro`), a tuple representing
534
+ Attaches documentation to a given function or type.
535
+
536
+ It expects the module the function/type belongs to, the line (a non
537
+ negative integer), the kind (`def` or `defmacro`), a tuple representing
535
538
the function and its arity, the function signature (the signature
536
539
should be omitted for types) and the documentation, which should
537
540
be either a binary or a boolean.
@@ -683,6 +686,7 @@ defmodule Module do
683
686
684
687
@ doc """
685
688
Checks if the module defines the given function or macro.
689
+
686
690
Use `defines?/3` to assert for a specific type.
687
691
688
692
## Examples
@@ -702,8 +706,9 @@ defmodule Module do
702
706
703
707
@ doc """
704
708
Checks if the module defines a function or macro of the
705
- given `kind`. `kind` can be any of `:def`, `:defp`,
706
- `:defmacro` or `:defmacrop`.
709
+ given `kind`.
710
+
711
+ `kind` can be any of `:def`, `:defp`, `:defmacro` or `:defmacrop`.
707
712
708
713
## Examples
709
714
@@ -761,6 +766,7 @@ defmodule Module do
761
766
762
767
@ doc """
763
768
Makes the given functions in `module` overridable.
769
+
764
770
An overridable function is lazily defined, allowing a
765
771
developer to customize it. See `Kernel.defoverridable/1` for
766
772
more information and documentation.
@@ -802,7 +808,9 @@ defmodule Module do
802
808
803
809
@ doc """
804
810
Puts an Erlang attribute to the given module with the given
805
- key and value. The semantics of putting the attribute depends
811
+ key and value.
812
+
813
+ The semantics of putting the attribute depends
806
814
if the attribute was registered or not via `register_attribute/3`.
807
815
808
816
## Examples
@@ -838,9 +846,12 @@ defmodule Module do
838
846
end
839
847
840
848
@ doc """
841
- Gets the given attribute from a module. If the attribute
842
- was marked with `accumulate` with `Module.register_attribute/3`,
843
- a list is always returned.
849
+ Gets the given attribute from a module.
850
+
851
+ If the attribute was marked with `accumulate` with
852
+ `Module.register_attribute/3`, a list is always returned. `nil` is returned
853
+ if the attribute has not been marked with `accumulate` and has not been set
854
+ to any value.
844
855
845
856
The `@` macro compiles to a call to this function. For example,
846
857
the following code:
0 commit comments