debian-mirror-gitlab/app/serializers/analytics_summary_entity.rb
2022-04-04 11:22:00 +05:30

15 lines
253 B
Ruby

# frozen_string_literal: true
class AnalyticsSummaryEntity < Grape::Entity
expose :identifier
expose :value, safe: true
expose :title
expose :unit, if: { with_unit: true }
expose :links
private
def value
object.value.to_s
end
end