Skip to content
instance method

URI::Generic#password=

(::String? password) -> ::String?
password=(password)

Args

v

String

Description

Public setter for the password component (with validation).

See also URI::Generic.check_password.

Usage

Example
require 'uri'

uri = URI.parse("http://john:[email protected]")
uri.password = "V3ry_S3nsit1ve"
uri.to_s  #=> "http://john:[email protected]"
See also #password #path= #parser #port= also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0