Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

URI::FTP#typecode=

typecode=(typecode)

Args

v

String

Description

Public setter for the typecode v (with validation).

See also URI::FTP.check_typecode.

Usage

Example
require 'uri'

uri = URI.parse("ftp://[email protected]/my_file.img")
#=> #<URI::FTP ftp://[email protected]/my_file.img>
uri.typecode = "i"
uri
#=> #<URI::FTP ftp://[email protected]/my_file.img;type=i>
See also #to_s #set_typecode also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0