Welcome to mirror list, hosted at ThFree Co, Russian Federation.

target.rb « audit « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9cb54aece8c4836fdded4dd91b4696a64840ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Gitlab
  module Audit
    class Target
      delegate :id, to: :@object

      def initialize(object)
        @object = object
      end

      def type
        @object.class.name
      end

      def details
        @object.try(:name) || @object.try(:audit_details) || 'unknown'
      end
    end
  end
end