class RuboCop::Cop::Style::MultilineMethodCallBraceLayout
This cop checks that the closing brace in a method call is symmetrical with respect to the opening brace and the method arguments.
If a method call's opening brace is on the same line as the first argument of the call, then the closing brace should be on the same line as the last argument of the call.
If a method call's opening brace is on a separate line from the first argument of the call, then the closing brace should be on the line after the last argument of the call.
@example
# bad foo(a, b ) # bad foo( a, b) # good foo(a, b) #good foo( a, b )
Constants
- NEW_LINE_MESSAGE
- SAME_LINE_MESSAGE
Public Instance Methods
on_send(node)
click to toggle source
# File lib/rubocop/cop/style/multiline_method_call_brace_layout.rb, line 50 def on_send(node) check_brace_layout(node) end
Private Instance Methods
children(node)
click to toggle source
# File lib/rubocop/cop/style/multiline_method_call_brace_layout.rb, line 56 def children(node) _receiver, _method_name, *args = *node args end