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: report.rb
    path of file: ./repos/gitlabhq/lib/gitlab/ci/badge/coverage
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab::Ci
  module Badge
    module Coverage
      ##
      # Test coverage report badge
      #
      class Report < Badge::Base
        attr_reader :projec
    
        def raw_coverage
          latest =
            if @job.present?
              builds = ::Ci::Build
                .in_pipelines([successful_pipeline, running_pipeline, failed_pipeline])
                .latest
                .success
                .for_ref(@ref)
                .by_name(@job)

              builds.max_by(&:created_at)
            else
              successful_pipeline
            end