Class: RuboCop::CLI::Command::ShowCops::ExactMatcher Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubocop/cli/command/show_cops.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



12
13
14
# File 'lib/rubocop/cli/command/show_cops.rb', line 12

def pattern
  @pattern
end

Instance Method Details

#match?(name) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


13
14
15
# File 'lib/rubocop/cli/command/show_cops.rb', line 13

def match?(name)
  name == pattern
end