debian-mirror-gitlab/lib/gitlab/audit/target.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
346 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# 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