Method: Addressable::URI#userinfo
- Defined in:
- lib/addressable/uri.rb
#userinfo ⇒ String
The userinfo component for this URI. Combines the user and password components.
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 |
# File 'lib/addressable/uri.rb', line 1052 def userinfo current_user = self.user current_password = self.password (current_user || current_password) && @userinfo ||= begin if current_user && current_password "#{current_user}:#{current_password}" elsif current_user && !current_password "#{current_user}" end end end |