2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-24 13:29:15 -04:00
|
|
|
class PenaltyCountsSerializer < ApplicationSerializer
|
2018-05-25 11:33:01 -04:00
|
|
|
attributes :silenced, :suspended, :total
|
|
|
|
|
|
|
|
def total
|
|
|
|
object.silenced + object.suspended
|
|
|
|
end
|
2018-04-24 13:29:15 -04:00
|
|
|
|
|
|
|
def silenced
|
|
|
|
object.silenced
|
|
|
|
end
|
|
|
|
|
|
|
|
def suspended
|
|
|
|
object.suspended
|
|
|
|
end
|
|
|
|
end
|