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: image.rb
    path of file: ./repos/asciidoctor-pdf/lib/asciidoctor/pdf/ext/asciidoctor
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Asciidoctor
  module Image
    Base64Encod
    
    def target_and_format
      image_path = inline? ? target : (attr 'target')
      if (image_path.start_with? 'data:') && (m = DataUriRx.match image_path)
        [(m[:data].extend Base64Encoded), (FormatAliases.fetch m[:fmt], m[:fmt])]
      else
        [image_path, (attr 'format', nil, false) || ((ext = ::File.extname image_path).downcase.slice 1, ext.length)]
      end