debian-mirror-gitlab/app/serializers/analytics_summary_entity.rb
2020-05-24 23:13:21 +05:30

13 lines
216 B
Ruby

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