Class: Gitlab::Git::AttributesAtRefParser

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/git/attributes_at_ref_parser.rb

Overview

Parses root .gitattributes file at a given ref

Instance Method Summary collapse

Constructor Details

#initialize(repository, ref) ⇒ AttributesAtRefParser

Returns a new instance of AttributesAtRefParser.


9
10
11
12
13
# File 'lib/gitlab/git/attributes_at_ref_parser.rb', line 9

def initialize(repository, ref)
  blob = repository.blob_at(ref, '.gitattributes')

  @parser = AttributesParser.new(blob&.data)
end