status_serializer.rb 241 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# frozen_string_literal: true

class StatusSerializer < ActiveModel::Serializer
  attributes :at, :status, :total

  def at
    object['at'].to_i
  end

  def status
    object['status']
  end

  def total
    object['total'].to_i
  end
end