Class: RuboCop::Cop::Homebrew::Presence Private

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

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

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



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'rubocops/presence.rb', line 81

def on_if(node)
  return if ignore_if_node?(node)

  redundant_receiver_and_other(node) do |receiver, other|
    return if ignore_other_node?(other) || receiver.nil?

    register_offense(node, receiver, other)
  end

  redundant_negative_receiver_and_other(node) do |receiver, other|
    return if ignore_other_node?(other) || receiver.nil?

    register_offense(node, receiver, other)
  end
end

#redundant_negative_receiver_and_other(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/presence.rbi', line 9

def redundant_negative_receiver_and_other(node, **kwargs, &block); end

#redundant_receiver_and_other(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/presence.rbi', line 12

def redundant_receiver_and_other(node, **kwargs, &block); end