Method: Addressable::URI#normalized_userinfo

Defined in:
lib/vendor/addressable/lib/addressable/uri.rb

#normalized_userinfoString

The userinfo component for this URI, normalized.

Returns:

  • (String)

    The userinfo component, normalized.



808
809
810
811
812
813
814
815
816
817
818
819
820
# File 'lib/vendor/addressable/lib/addressable/uri.rb', line 808

def normalized_userinfo
  @normalized_userinfo ||= (begin
    current_user = self.normalized_user
    current_password = self.normalized_password
    if !current_user && !current_password
      nil
    elsif current_user && current_password
      "#{current_user}:#{current_password}"
    elsif current_user && !current_password
      "#{current_user}"
    end
  end)
end