debian-mirror-gitlab/lib/gitlab/audit/target.rb
2022-08-27 11:52:29 +05:30

21 lines
346 B
Ruby

# 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