Class: Gitlab::Git::GitmodulesParser

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

Defined Under Namespace

Classes: State

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ GitmodulesParser

Returns a new instance of GitmodulesParser.


8
9
10
# File 'lib/gitlab/git/gitmodules_parser.rb', line 8

def initialize(content)
  @content = content
end

Instance Method Details

#parseObject

Parses the contents of a .gitmodules file and returns a hash of submodule information, indexed by path.


14
15
16
# File 'lib/gitlab/git/gitmodules_parser.rb', line 14

def parse
  reindex_by_path(get_submodules_by_name)
end