Class: RuboCop::Cop::Homebrew::Blank Private
- Extended by:
- AutoCorrector
- Defined in:
- rubocops/blank.rb,
sorbet/rbi/dsl/rubo_cop/cop/homebrew/blank.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::Blank
.
Please instead update this file by running bin/tapioca dsl RuboCop::Cop::Homebrew::Blank
.
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 `%<prefer>s` instead of `%<current>s`."
Instance Method Summary collapse
Instance Method Details
#nil_or_empty?(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/blank.rbi', line 9 def nil_or_empty?(node, **kwargs, &block); end |
#on_or(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.
47 48 49 50 51 52 53 54 55 56 |
# File 'rubocops/blank.rb', line 47 def on_or(node) nil_or_empty?(node) do |var1, var2| return if var1 != var2 = format(MSG, prefer: replacement(var1), current: node.source) add_offense(node, message:) do |corrector| autocorrect(corrector, node) end end end |