Method: Gem::Uri#redact_credentials_from

Defined in:
lib/rubygems/uri.rb

#redact_credentials_from(text) ⇒ Object



66
67
68
69
70
# File 'lib/rubygems/uri.rb', line 66

def redact_credentials_from(text)
  return text unless valid_uri? && password? && text.include?(to_s)

  text.sub(password, "REDACTED")
end