@@ -6,16 +6,16 @@ defmodule Node do
66 @ type t :: atom
77
88 @ doc """
9- Returns the current node. It returns the same as the built-in node().
9+ Returns the current node. It returns the same as the built-in ` node()` .
1010 """
1111 @ spec self :: t
1212 def self do
1313 :erlang . node ( )
1414 end
1515
1616 @ doc """
17- Returns true if the local node is alive; that is, if the node can be
18- part of a distributed system. Otherwise, it returns false.
17+ Returns ` true` if the local node is alive; that is, if the node can be
18+ part of a distributed system. Otherwise, it returns ` false` .
1919 """
2020 @ spec alive? :: boolean
2121 def alive? do
@@ -24,7 +24,7 @@ defmodule Node do
2424
2525 @ doc """
2626 Returns a list of all visible nodes in the system, excluding
27- the local node. Same as list(visible).
27+ the local node. Same as ` list(: visible)` .
2828 """
2929 @ spec list :: [ t ]
3030 def list do
@@ -45,8 +45,8 @@ defmodule Node do
4545 end
4646
4747 @ doc """
48- Monitors the status of the node. If flag is true, monitoring is
49- turned on. If flag is false, monitoring is turned off.
48+ Monitors the status of the node. If ` flag` is ` true` , monitoring is
49+ turned on. If ` flag` is ` false` , monitoring is turned off.
5050
5151 See http://www.erlang.org/doc/man/erlang.html#monitor_node-2 for more info.
5252 """
@@ -56,8 +56,8 @@ defmodule Node do
5656 end
5757
5858 @ doc """
59- Behaves as monitor_node/2 except that it allows an extra
60- option to be given, namely :allow_passive_connect.
59+ Behaves as `monitor/2` except that it allows an extra
60+ option to be given, namely ` :allow_passive_connect` .
6161
6262 See http://www.erlang.org/doc/man/erlang.html#monitor_node-3 for more info.
6363 """
@@ -69,8 +69,8 @@ defmodule Node do
6969 @ doc """
7070 Forces the disconnection of a node. This will appear to the `node` as if
7171 the local node has crashed. This BIF is mainly used in the Erlang network
72- authentication protocols. Returns true if disconnection succeeds, otherwise
73- false. If the local node is not alive, the function returns ignored.
72+ authentication protocols. Returns ` true` if disconnection succeeds, otherwise
73+ ` false` . If the local node is not alive, the function returns `: ignored` .
7474
7575 See http://www.erlang.org/doc/man/erlang.html#disconnect_node-1 for more info.
7676 """
@@ -80,8 +80,8 @@ defmodule Node do
8080 end
8181
8282 @ doc """
83- Establishes a connection to Node . Returns true if successful,
84- false if not, and the atom `:ignored` if the local node is not
83+ Establishes a connection to `node` . Returns ` true` if successful,
84+ ` false` if not, and the atom `:ignored` if the local node is not
8585 alive.
8686
8787 See http://erlang.org/doc/man/net_kernel.html#connect_node-1 for more info.
@@ -145,7 +145,7 @@ defmodule Node do
145145 Returns the pid of a new process started by the application of `fun`
146146 on `node`. A link is created between the calling process and the
147147 new process, atomically. If `node` does not exist, a useless pid is returned
148- (and due to the link, an exit signal with exit reason :noconnection will be
148+ (and due to the link, an exit signal with exit reason ` :noconnection` will be
149149 received).
150150 """
151151 @ spec spawn_link ( t , ( ( ) -> any ) ) :: pid
@@ -158,7 +158,7 @@ defmodule Node do
158158 `module.function(args)` on `node`. A link is created between the calling
159159 process and the new process, atomically. If `node` does not exist, a useless
160160 pid is returned (and due to the link, an exit signal with exit reason
161- :noconnection will be received).
161+ ` :noconnection` will be received).
162162 """
163163 @ spec spawn_link ( t , module , atom , [ any ] ) :: pid
164164 def spawn_link ( node , module , fun , args ) do
@@ -167,10 +167,10 @@ defmodule Node do
167167
168168 @ doc """
169169 Sets the magic cookie of `node` to the atom `cookie`. The default node
170- is `Node.self`, the local node. If node is the local node, the function also
170+ is `Node.self`, the local node. If ` node` is the local node, the function also
171171 sets the cookie of all other unknown nodes to `cookie`.
172172
173- This function will raise `FunctionClauseError` if the given node is not alive.
173+ This function will raise `FunctionClauseError` if the given ` node` is not alive.
174174 """
175175 def set_cookie ( node // Node . self , cookie ) when is_atom ( cookie ) do
176176 :erlang . set_cookie ( node , cookie )
@@ -183,4 +183,4 @@ defmodule Node do
183183 def get_cookie ( ) do
184184 :erlang . get_cookie ( )
185185 end
186- end
186+ end
0 commit comments