Method: Bundler::URI::FTP.new2

Defined in:
lib/bundler/vendor/uri/lib/uri/ftp.rb

.new2(user, password, host, port, path, typecode = nil, arg_check = true) ⇒ Object


47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/bundler/vendor/uri/lib/uri/ftp.rb', line 47

def self.new2(user, password, host, port, path,
              typecode = nil, arg_check = true) # :nodoc:
  # Do not use this method!  Not tested.  [Bug #7301]
  # This methods remains just for compatibility,
  # Keep it undocumented until the active maintainer is assigned.
  typecode = nil if typecode.size == 0
  if typecode && !TYPECODE.include?(typecode)
    raise ArgumentError,
      "bad typecode is specified: #{typecode}"
  end

  # do escape

  self.new('ftp',
           [user, password],
           host, port, nil,
           typecode ? path + TYPECODE_PREFIX + typecode : path,
           nil, nil, nil, arg_check)
end