Module: Leftovers::MatcherBuilders::Path

Defined in:
lib/leftovers/matcher_builders/path.rb

Class Method Summary collapse

Class Method Details

.build(path_pattern) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/leftovers/matcher_builders/path.rb', line 8

def self.build(path_pattern)
  return if path_pattern.nil? || path_pattern.empty?

  Matchers::Path.new(
    ::FastIgnore.new(include_rules: path_pattern, gitignore: false, root: ::Leftovers.pwd)
  )
end