Class: RuboCop::Cop::Homebrew::NegateInclude Private
- Extended by:
- AutoCorrector
- Defined in:
- rubocops/negate_include.rb,
sorbet/rbi/dsl/rubo_cop/cop/homebrew/negate_include.rbi
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
DO NOT EDIT MANUALLY
This is an autogenerated file for dynamic methods in RuboCop::Cop::Homebrew::NegateInclude
.
Please instead update this file by running bin/tapioca dsl RuboCop::Cop::Homebrew::NegateInclude
.
Constant Summary collapse
- MSG =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"Use `.exclude?` and remove the negation part."
- RESTRICT_ON_SEND =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
[:!].freeze
Instance Method Summary collapse
Instance Method Details
#negate_include_call?(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
9 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/negate_include.rbi', line 9 def negate_include_call?(node, **kwargs, &block); end |
#on_send(node) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
35 36 37 38 39 40 41 |
# File 'rubocops/negate_include.rb', line 35 def on_send(node) return unless (receiver, obj = negate_include_call?(node)) add_offense(node) do |corrector| corrector.replace(node, "#{receiver.source}.exclude?(#{obj.source})") end end |