Represents an ignore file (like .gitignore) that can be read, modified, and saved
Constructors
Initialize from a file path
By default, creates empty if file doesn't exist
Set create: false to raise if file doesn't exist
SourceInstance methods
Add a pattern (appends to end)
Sourceclear
Remove all lines (patterns, comments, and blanks)
Sourceeach
Iterate over pattern strings (Enumerable support)
Sourceempty?
Check if there are no patterns
SourceCheck if a path should be ignored
SourceCheck if a pattern exists
Sourcelines
All lines including comments and blank lines
Sourcepatterns
Only pattern lines (excludes comments and blank lines)
Sourcereload
Reload from disk (discards unsaved changes)
Sourceremove(pattern :
String) : self
Remove a pattern (first occurrence)
Sourcesave(path :
String = @path) : self
Save to file (original path or specified path)
Sourcesize
Number of patterns (excludes comments and blank lines)
Source