Class: RuboCop::Cop::Kata::PairedBrackets
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Kata::PairedBrackets
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/kata/paired_brackets.rb
Overview
SPDX-FileCopyrightText: Copyright (c) 2019-2026 Yegor Bugayenko SPDX-License-Identifier: MIT Derived from rubocop-elegant (https://github.com/yegor256/rubocop-elegant), see LICENSE.txt
Constant Summary collapse
- MSG =
"Bracket %s must be paired on the same line, or start/end its line"- OPENERS =
%i[tLPAREN tLPAREN2 tLPAREN_ARG tLBRACK tLBRACK2 tLCURLY tLBRACE tLBRACE_ARG].freeze
- CLOSERS =
%i[tRPAREN tRBRACK tRCURLY].freeze
- BLANKS =
[" ", "\t"].freeze
Instance Method Summary collapse
Instance Method Details
#on_new_investigation ⇒ Object
16 17 18 19 |
# File 'lib/rubocop/cop/kata/paired_brackets.rb', line 16 def on_new_investigation super pairs.each { |opener, closer| check(opener, closer) } end |