struct Zap::Utils::Git::Ignore

Overview

Attempt to reproduce the gitignore resolution algorithm.

I tried to use globs first, but the Crystal implementation does not feel right. Ultimately it seems easier to use regexes.

Defined in:

utils/git/ignore.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

or(other : T) : T | self forall T or, pipe(&) pipe

Constructor Detail

def self.new(patterns : Array(String)) #

[View source]
def self.new(rules : Array(Pattern)) #

[View source]

Instance Method Detail

def match?(entry : String) : Bool #

Important: directory entries must end with a slash


[View source]
def merge(other : Git::Ignore) : Git::Ignore #

[View source]
def rules : Array(Pattern) #

[View source]