Pattern: Multi-line memoization
Issue: -
This rule checks expressions wrapping styles for multi-line memoization. Wrap blocks in begin
and end
instead.
# 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
)
Attribute | Value |
---|---|
EnforcedStyle | keyword |
SupportedStyles | keyword, braces |