Module: Gitlab::RepositoryUrlBuilder

Defined in:
lib/gitlab/repository_url_builder.rb

Class Method Summary collapse

Class Method Details

.build(path, protocol: :ssh) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/gitlab/repository_url_builder.rb', line 6

def build(path, protocol: :ssh)
  case protocol
  when :ssh
    ssh_url(path)
  when :http
    http_url(path)
  else
    raise NotImplementedError, "No URL builder defined for protocol #{protocol}"
  end
end