Class: RuboCop::Cop::Sevencop::MethodDefinitionArgumentsMultiline
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Sevencop::MethodDefinitionArgumentsMultiline
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/sevencop/method_definition_arguments_multiline.rb
Overview
Inserts new lines between method definition arguments.
Constant Summary collapse
- MSG =
'Insert new lines between method definition arguments.'
Instance Method Summary collapse
Instance Method Details
#on_args(node) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/rubocop/cop/sevencop/method_definition_arguments_multiline.rb', line 29 def on_args(node) return unless method_args?(node) return if multilined?(node) add_offense(node) do |corrector| autocorrect(corrector, node) end end |