class Starline::Builders::GeoPoints

Public Class Methods

build(tracks_json) click to toggle source
# File lib/starline/builders/geo_points.rb, line 6
def self.build(tracks_json)
  points = tracks_json.fetch("desc")
  points.map { |point_hash| build_geo_point(point_hash) }
end

Private Class Methods

build_geo_point(hash) click to toggle source
# File lib/starline/builders/geo_points.rb, line 12
def self.build_geo_point(hash)
  Entities::GeoPoint.new(
    lat: hash["y"],
    lon: hash["x"],
    timestamp: hash["ts"]
  )
end