Pattern: Missing empty line between method definitions
Issue: -
This rule checks whether method definitions are separated by one empty line.
NumberOfEmptyLines
can be and integer (e.g. 1 by default) or
an array (e.g. [1, 2]) to specify a minimum and a maximum of
empty lines.
AllowAdjacentOneLineDefs
can be used to configure is adjacent
one line methods definitions are an offense
def some_method
data = initialize(options)
data.manipulate!
data.result
end
def some_method
result
end
Attribute | Value |
---|---|
AllowAdjacentOneLineDefs | false |
NumberOfEmptyLines | 1 |