1# frozen_string_literal: true 2 3module Presentable 4 extend ActiveSupport::Concern 5 6 class_methods do 7 def present(attributes) 8 all.map { |klass_object| klass_object.present(**attributes) } 9 end 10 end 11 12 def present(**attributes) 13 Gitlab::View::Presenter::Factory 14 .new(self, **attributes) 15 .fabricate! 16 end 17end 18