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

module Gitlab
  module Audit
    class Auditor
      attr_reader :scope, :name

      PERMITTED_TARGET_CLASSES = [
        ::Operations::FeatureFlag
      ].freeze

      # Record audit events
      #
      # @param [Hash] context
      # @option context [String] :name the operation name to be audited, used for error tracking
      # @option context [User] :author the user who authors the change
      # @option context [User, Project, Group] :scope the scope which audit event belongs to
      # @option context [Object] :target the target object being audited
      # @option context [String] :message the message describing the action
      # @option context [Hash] :additional_details the additional details we want to merge into audit event details.
      # @option context [Time] :created_at the time tha
    
      def initialize(context = {})
        @context = context

        @name = @context.fetch(:name, 'audit_operation')
        @is_audit_event_yaml_defined = Gitlab::Audit::Type::Definition.defined?(@name)
        @stream_only = stream_only?
        @author = @context.fetch(:author)
        @scope = @context.fetch(:scope)
        @target = @context.fetch(:target)
        @created_at = @context.fetch(:created_at, DateTime.current)
        @message = @context.fetch(:message, '')
        @additional_details = @context.fetch(:additional_details, {})
        @ip_address = @context[:ip_address]
        @target_details = @context[:target_details]
        @authentication_event = @context.fetch(:authentication_event, false)
        @authentication_provider = @context[:authentication_provider]

        return if @is_audit_event_yaml_defined

        raise StandardError, "Audit event type YML file is not defined for #{@name}. Please read " \
                             "https://docs.gitlab.com/ee/development/audit_event_guide/" \
                             "#how-to-instrument-new-audit-events for adding a new audit event"
      end