Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 954 Bytes

Layout-EmptyLineBetweenDefs.md

File metadata and controls

45 lines (28 loc) · 954 Bytes

Pattern: Missing empty line between method definitions

Issue: -

Description

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

Examples

def some_method
  data = initialize(options)

  
  data.manipulate!

  
  data.result
end


def some_method
  result
end

Default configuration

Attribute Value
AllowAdjacentOneLineDefs false
NumberOfEmptyLines 1

Further Reading