Class: RuboCop::CLI::Command::ShowCops::WildcardMatcher 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



18
19
20
# File 'lib/rubocop/cli/command/show_cops.rb', line 18

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)


19
20
21
# File 'lib/rubocop/cli/command/show_cops.rb', line 19

def match?(name)
  File.fnmatch(pattern, name, File::FNM_PATHNAME)
end