Method: Git::GitAltURI#initialize

Defined in:
lib/git/url.rb

#initialize(user:, host:, path:) ⇒ GitAltURI

Create a new GitAltURI object

Examples:

uri = Git::GitAltURI.new(user: 'james', host: 'github.com', path: 'james/ruby-git')
uri.to_s #=> 'james@github.com/james/ruby-git'

Parameters:

  • user (String, nil)

    the user from the URL or nil

  • host (String)

    the host from the URL

  • path (String)

    the path from the URL

[View source]

96
97
98
# File 'lib/git/url.rb', line 96

def initialize(user:, host:, path:)
  super(scheme: 'git-alt', user: user, host: host, path: path)
end