class Addressable::URI

def normalized_authority

Returns:
  • (String) - The authority component, normalized.
def normalized_authority
  self.authority && @normalized_authority ||= (begin
    authority = ""
    if self.normalized_userinfo != nil
      authority << "#{self.normalized_userinfo}@"
    end
    authority << self.normalized_host
    if self.normalized_port != nil
      authority << ":#{self.normalized_port}"
    end
    authority
  end)
end