class RuboCop::Cop::Style::EmptyLinesAroundMethodBody
This cops checks if empty lines around the bodies of methods match the configuration.
@example
def something(arg) ... end
Constants
- KIND
Private Instance Methods
on_method_def(node, _method_name, _args, body)
click to toggle source
# File lib/rubocop/cop/style/empty_lines_around_method_body.rb, line 24 def on_method_def(node, _method_name, _args, body) check(node, body) end
style()
click to toggle source
Override RuboCop::Cop::ConfigurableEnforcedStyle#style and hard-code configuration. It's difficult to imagine that anybody would want empty lines around a method body, so we don't make it configurable.
# File lib/rubocop/cop/style/empty_lines_around_method_body.rb, line 31 def style :no_empty_lines end