Sha256: 0ff8dfc365a1f725553b16894b20bf6b7763a495a88b1f322cf35f28a822669b

Contents?: true

Size: 381 Bytes

Versions: 4

Compression:

Stored size: 381 Bytes

Contents

# frozen-string-literal: true

require 'fast_ignore'

module Leftovers
  module MatcherBuilders
    module Path
      def self.build(path_pattern)
        return if path_pattern.nil? || path_pattern.empty?

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
leftovers-0.11.1 lib/leftovers/matcher_builders/path.rb
leftovers-0.11.0 lib/leftovers/matcher_builders/path.rb
leftovers-0.10.0 lib/leftovers/matcher_builders/path.rb
leftovers-0.9.0 lib/leftovers/matcher_builders/path.rb