Class: RuboCop::Cop::Vicenzo::Style::MultilineMethodCallParentheses
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Vicenzo::Style::MultilineMethodCallParentheses
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/vicenzo/style/multiline_method_call_parentheses.rb
Overview
Enforces parentheses for method calls with arguments that span multiple lines. Single-line calls are ignored (parentheses are optional).
This cop accepts an AllowedMethods configuration to exempt specific methods
from this rule. This is particularly useful for Fluent DSLs (like RSpec's
to, change, etc.) where parentheses might hurt readability or conflict
with layout rules.
Constant Summary collapse
- MSG =
'Use parentheses for method calls with arguments that span multiple lines.'
Instance Method Summary collapse
- #on_send(node) ⇒ Object (also: #on_csend)
Instance Method Details
#on_send(node) ⇒ Object Also known as: on_csend
39 40 41 |
# File 'lib/rubocop/cop/vicenzo/style/multiline_method_call_parentheses.rb', line 39 def on_send(node) check_node(node) end |