mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
20 lines
304 B
Ruby
20 lines
304 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Api::SlimPointSerializer
|
|
def initialize(point)
|
|
@point = point
|
|
end
|
|
|
|
def call
|
|
{
|
|
id: point.id,
|
|
latitude: point.lat.to_s,
|
|
longitude: point.lon.to_s,
|
|
timestamp: point.timestamp
|
|
}
|
|
end
|
|
|
|
private
|
|
|
|
attr_reader :point
|
|
end
|