user=(user) public

Args

v

String

Description

public setter for the user component. (with validation)

see also URI::Generic.check_user

Usage

require 'uri'

uri = URI.parse("http://john:S3nsit1ve@my.example.com")
uri.user = "sam"
# =>  "sam"
uri
#=> #<URI::HTTP:0x00000000881d90 URL:http://sam:V3ry_S3nsit1ve@my.example.com>
Show source
Register or log in to add new notes.