Skip to content

Files

Latest commit

 

History

History
51 lines (38 loc) · 660 Bytes

Style-MultilineMemoization.md

File metadata and controls

51 lines (38 loc) · 660 Bytes

Pattern: Multi-line memoization

Issue: -

Description

This rule checks expressions wrapping styles for multi-line memoization. Wrap blocks in begin and end instead.

Examples

# EnforcedStyle: keyword (default)

# bad
foo ||= (
  bar
  baz
)

# good
foo ||= begin
  bar
  baz
end
# EnforcedStyle: braces

# bad
foo ||= begin
  bar
  baz
end

# good
foo ||= (
  bar
  baz
)

Default configuration

Attribute Value
EnforcedStyle keyword
SupportedStyles keyword, braces

Further Reading