debian-mirror-gitlab/app/serializers/analytics_summary_entity.rb

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

16 lines
253 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
class AnalyticsSummaryEntity < Grape::Entity
2022-04-04 11:22:00 +05:30
expose :identifier
2017-08-17 22:00:37 +05:30
expose :value, safe: true
expose :title
2020-04-22 19:07:51 +05:30
expose :unit, if: { with_unit: true }
2021-12-11 22:18:48 +05:30
expose :links
2020-04-22 19:07:51 +05:30
private
def value
2020-05-24 23:13:21 +05:30
object.value.to_s
2020-04-22 19:07:51 +05:30
end
2017-08-17 22:00:37 +05:30
end