Class: RuboCop::Cop::Homebrew::CompactBlank Private

Inherits:
Base
  • Object
show all
Extended by:
AutoCorrector
Includes:
RangeHelp
Defined in:
rubocops/compact_blank.rb,
sorbet/rbi/dsl/rubo_cop/cop/homebrew/compact_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::CompactBlank. Please instead update this file by running bin/tapioca dsl RuboCop::Cop::Homebrew::CompactBlank.

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 `%<preferred_method>s` instead."
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.

[:reject, :delete_if, :reject!].freeze

Instance Method Summary collapse

Instance Method Details

#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.



65
66
67
68
69
70
71
72
73
# File 'rubocops/compact_blank.rb', line 65

def on_send(node)
  return unless bad_method?(node)

  range = offense_range(node)
  preferred_method = preferred_method(node)
  add_offense(range, message: format(MSG, preferred_method:)) do |corrector|
    corrector.replace(range, preferred_method)
  end
end

#reject_with_block?(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.

Parameters:

Returns:

  • (T.untyped)


9
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/compact_blank.rbi', line 9

def reject_with_block?(node, **kwargs, &block); end

#reject_with_block_pass?(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.

Parameters:

Returns:

  • (T.untyped)


12
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/compact_blank.rbi', line 12

def reject_with_block_pass?(node, **kwargs, &block); end