class RuboCop::FilePatterns

A wrapper around patterns array to perform optimized search.

For projects with a large set of rubocop todo files, most items in ‘Exclude`/`Include` are exact file names. It is wasteful to linearly check the list of patterns over and over to check if the file is relevant to the cop.

This class partitions an array of patterns into a set of exact match strings and the rest of the patterns. This way we can firstly do a cheap check in the set and then proceed via the costly patterns check, if needed. @api private