class
Ignore::Matcher
- Ignore::Matcher
- Reference
- Object
Overview
A collection of gitignore patterns that can match paths
Included Modules
- Enumerable(String)
Defined in:
ignore.crConstructors
Instance Method Summary
-
#add(pattern : String, base : String = "") : self
Add a single pattern string
-
#add_file(path : String, base : String = "") : self
Load patterns from a .gitignore file
-
#clear : self
Remove all patterns
-
#each(& : String -> ) : Nil
Iterate over pattern strings
-
#empty? : Bool
Check if matcher has any patterns
-
#ignores?(path : String) : Bool
Check if a path should be ignored Use trailing / for directories: ignores?("build/")
-
#parse(content : String, base : String = "") : self
Parse gitignore content (multiple lines)
-
#patterns : Array(String)
Returns the pattern strings
-
#size : Int32
Returns the number of patterns
Constructor Detail
Instance Method Detail
def ignores?(path : String) : Bool
#
Check if a path should be ignored Use trailing / for directories: ignores?("build/")