Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. 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.2 · 3.1 · 3.0