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: gift_purchaser_mailer.rb
    path of file: ./repos/circulate/app/mailers
    
    the code of the file until where you have to start completion: class GiftPurchaserMailer < ApplicationMailer
  before_action :generate_uuid
  after_action :set_uuid_header
  after_action :store_notification

  def confirmation
    @gift_member
    
  def confirmation
    @gift_membership = params[:gift_membership]
    @library = @gift_membership.library
    @subject = "How to Redeem Your Membership to the #{@library.name}!"

    generator = Certificate::Generator.new(code: @gift_membership.code.format)
    certificate_path = generator.generate
    attachments["certificate.jpg"] = File.read(certificate_path)

    mail(to: @gift_membership.purchaser_email, subject: @subject)
  end