Method: PathList::GitignoreRuleGroup#initialize

Defined in:
lib/path_list/gitignore_rule_group.rb

#initialize(root) ⇒ GitignoreRuleGroup

Returns a new instance of GitignoreRuleGroup.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/path_list/gitignore_rule_group.rb', line 7

def initialize(root)
  @root = root
  @loaded_paths = Set[root]

  super([
    ::PathList::Patterns.new('.git', root: '/'),
    ::PathList::Patterns.new(from_file: ::PathList::GlobalGitignore.path(root: root), root: root),
    ::PathList::Patterns.new(from_file: "#{root}.git/info/exclude", root: root),
    ::PathList::Patterns.new(from_file: "#{root}.gitignore", root: root)
  ], false)
end