Missing top-level module documentation comment. Open
module ExchangeHelper
- Read upRead up
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end
Use %w
or %W
for an array of words. Open
[
'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CNY', 'CZK', 'DKK', 'EUR', 'GBP',
'HKD', 'HRK', 'HUF', 'IDR', 'ILS', 'INR', 'JPY', 'KRW', 'MXN',
'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RUB', 'SEK', 'SGD',
'THB', 'TRY', 'USD', 'ZAR'
- Read upRead up
- Exclude checks
This cop can check for array literals made up of word-like strings, that are not using the %w() syntax.
Alternatively, it can check for uses of the %w() syntax, in projects which do not want to include that syntax.
Configuration option: MinSize
If set, arrays with fewer elements than this value will not trigger the
cop. For example, a MinSize
of 3
will not enforce a style on an
array of 2 or fewer elements.
Example: EnforcedStyle: percent (default)
# good
%w[foo bar baz]
# bad
['foo', 'bar', 'baz']
Example: EnforcedStyle: brackets
# good
['foo', 'bar', 'baz']
# bad
%w[foo bar baz]