2018-07-19 14:43:13 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-06 08:12:12 -04:00
|
|
|
class CohortActivityMonthEntity < Grape::Entity
|
|
|
|
include ActionView::Helpers::NumberHelper
|
|
|
|
|
|
|
|
expose :total do |cohort_activity_month|
|
|
|
|
number_with_delimiter(cohort_activity_month[:total])
|
|
|
|
end
|
|
|
|
|
|
|
|
expose :percentage do |cohort_activity_month|
|
|
|
|
number_to_percentage(cohort_activity_month[:percentage], precision: 0)
|
|
|
|
end
|
|
|
|
end
|