method

user=

v2_6_3 - Show latest stable - Class: URI::Generic
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:[email protected]")
uri.user = "sam"
uri.to_s  #=> "http://sam:[email protected]"