Skip to content

Commit a6d97d2

Browse files
committed
vale fixes + RM comment
1 parent c01b8d0 commit a6d97d2

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

source/code-documentation.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,23 @@ Formatting
120120
# must not be indented.
121121
#
122122
# @return [ Symbol ] For macros, wraps must be double-space indented
123-
# on the second, third, etc. lines.
123+
# on the second, third (and so on) lines.
124124

125125
- **Whitespace:** Do not use leading/trailing empty comment lines,
126126
or more than one consecutive empty comment line.
127127

128128
.. code-block:: ruby
129129

130-
# GOOD:
130+
# DO THIS:
131131
# @return [ Symbol ] The return value
132132
def my_method
133133

134-
# BAD:
134+
# NOT THIS:
135135
# @return [ Symbol ] The return value
136136
#
137137
def my_method
138138

139-
# BAD:
139+
# NOT THIS:
140140
# @param [ Symbol ] foo The input value
141141
#
142142
#
@@ -210,10 +210,10 @@ Type Declaration
210210

211211
.. code-block:: ruby
212212

213-
# GOOD:
213+
# DO THIS:
214214
# @param [ true | false | nil ] bool A boolean or nil value.
215215

216-
# BAD:
216+
# NOT THIS:
217217
# @param [ TrueClass | FalseClass | NilClass ] bool A boolean or nil value.
218218
# @param [ Boolean ] bool A boolean value.
219219

@@ -228,20 +228,20 @@ Type Declaration
228228

229229
.. code-block:: ruby
230230

231-
# @param [ String... ] *items The list of items name(s) as Strings.
231+
# @param [ String... ] *items The list of items' names as Strings.
232232
def buy_groceries(*items)
233233

234234
- **Splat Args:** Do not use ``Array`` as the type unless each arg is actually an Array.
235235

236236
.. code-block:: ruby
237237

238-
# BAD:
239-
# @param [ Array<String> ] *items The list of items name(s) as Strings.
238+
# DO NOT DO THIS:
239+
# @param [ Array<String> ] *items The list of items' names as Strings.
240240
def buy_groceries(*items)
241241

242242
buy_groceries("Cheese", "Crackers", "Wine")
243243

244-
# OK:
244+
# DO THIS:
245245
# @param [ Array<String>... ] *arrays One or more arrays containing name parts.
246246
def set_people_names(*arrays)
247247

@@ -277,8 +277,8 @@ Type Declaration
277277

278278
.. code-block:: ruby
279279

280-
# @param opts [ Hash<Symbol, Object> ] The optional hash argument(s).
281-
# @option opts [ String | Array<String> ] :items The items(s) as Strings to include.
280+
# @param opts [ Hash<Symbol, Object> ] The optional hash argument or arguments.
281+
# @option opts [ String | Array<String> ] :items The items as Strings to include.
282282
# @option opts [ Integer ] :limit An Integer denoting the limit.
283283
def buy_groceries(opts = {})
284284

@@ -290,8 +290,8 @@ Type Declaration
290290

291291
.. code-block:: ruby
292292

293-
# @param **kwargs The optional keyword argument(s).
294-
# @option **kwargs [ String | Array<String> ] :items The items(s) as Strings to include.
293+
# @param **kwargs The optional keyword argument or arguments.
294+
# @option **kwargs [ String | Array<String> ] :items The items as Strings to include.
295295
# @option **kwargs [ Integer ] :limit An Integer denoting the limit.
296296
def buy_groceries(**kwargs)
297297

@@ -340,8 +340,8 @@ Type Declaration
340340
yield(:peacock, :conservatory, :wrench)
341341
end
342342

343-
- **Proc Args:** Proc arguments must use ``@param`` (not ``@yield``). The
344-
inputs to the proc may be specified as subtype(s).
343+
- **Proc Args:** Use ``@param`` (not ``@yield``) for proc arguments. The
344+
inputs to the proc may be specified as subtypes.
345345

346346
.. code-block:: ruby
347347

0 commit comments

Comments
 (0)