class

Ignore::Matcher

Inherits Enumerable < Reference < Object

A collection of gitignore patterns that can match paths

Constructors

Instance methods

add(pattern : String, base : String = "") : self

Add a single pattern string

Source
add_file(path : String, base : String = "") : self

Load patterns from a .gitignore file

Source
clear

Remove all patterns

Source
each

Iterate over pattern strings

Source
empty?

Check if matcher has any patterns

Source
ignores?(path : String) : Bool

Check if a path should be ignored Use trailing / for directories: ignores?("build/")

Source
parse(content : String, base : String = "") : self

Parse gitignore content (multiple lines)

Source
patterns

Returns the pattern strings

Source
size

Returns the number of patterns

Source