new(*arg)
public
Description
Create a new URI::FTP object from ``generic’‘
components with no check.
Usage
require 'uri'
p ftp = URI.parse("ftp://ftp.ruby-lang.org/pub/ruby/;type=d")
p ftp.typecode
Show source
def initialize(*arg)
super(*arg)
@typecode = nil
tmp = @path.index(TYPECODE_PREFIX)
if tmp
typecode = @path[tmp + TYPECODE_PREFIX.size..-1]
self.set_path(@path[0..tmp - 1])
if arg[-1]
self.typecode = typecode
else
self.set_typecode(typecode)
end
end
end