123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::CLI::Command::ShowCops::WildcardMatcher Private

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/rubocop/cli/command/show_cops.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#pattern (rw)

[ GitHub ]

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

WildcardMatcher = Struct.new(:pattern)

Instance Method Details

#match?(name) ⇒ Boolean

[ GitHub ]

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

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