Skip to content

Files

Latest commit

 

History

History
66 lines (39 loc) · 801 Bytes

Style-AccessModifierDeclarations.md

File metadata and controls

66 lines (39 loc) · 801 Bytes

Pattern: Malformed access modifier declaration

Issue: -

Description

Access modifiers should be declared to apply to a group of methods or inline before each method, depending on configuration.

Examples

EnforcedStyle: group (default)

# bad

class Foo

  private def bar; end
  private def baz; end

end

# good

class Foo

  private

  def bar; end
  def baz; end

end

EnforcedStyle: inline

# bad

class Foo

  private

  def bar; end
  def baz; end

end

# good

class Foo

  private def bar; end
  private def baz; end

end

Default configuration

Attribute Value
EnforcedStyle group

Further Reading