dawarich/app/serializers/point_serializer.rb

18 lines
295 B
Ruby
Raw Normal View History

2024-09-02 14:51:34 -04:00
# frozen_string_literal: true
class PointSerializer
EXCLUDED_ATTRIBUTES = %w[created_at updated_at visit_id id import_id user_id].freeze
def initialize(point)
@point = point
end
def call
point.attributes.except(*EXCLUDED_ATTRIBUTES)
end
private
attr_reader :point
end