You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: active_storage_blob.rb
    path of file: ./repos/code_fund_ads/app/lib/extensions
    
    the code of the file until where you have to start completion: module Extensions
  mod
    
    def cloudfront_url
      return service_url unless cloudfront_host
      return service_url unless defined?(ActiveStorage::Service::S3Service)
      return service_url unless service.is_a?(ActiveStorage::Service::S3Service)
      uri = URI(service_url)
      path = uri.path.gsub("/#{service.bucket.name}", "")
      "https://#{cloudfront_host}#{path}"
    rescue => e1
      Rollbar.error e1
      begin
        service_url
      rescue => e2
        Rollbar.error e2
        ""
      end