debian-mirror-gitlab/app/serializers/ci/daily_build_group_report_result_entity.rb
2020-06-23 00:09:42 +05:30

14 lines
376 B
Ruby

# frozen_string_literal: true
module Ci
class DailyBuildGroupReportResultEntity < Grape::Entity
expose :date
::Ci::DailyBuildGroupReportResult::PARAM_TYPES.each do |type|
expose type, if: lambda { |report_result, options| options[:param_type] == type } do |report_result, options|
report_result.data[options[:param_type]]
end
end
end
end