dawarich/app/services/own_tracks/rec_parser.rb

16 lines
248 B
Ruby
Raw Normal View History

2024-10-15 16:30:16 -04:00
# frozen_string_literal: true
class OwnTracks::RecParser
attr_reader :file
def initialize(file)
@file = file
2024-10-15 16:30:16 -04:00
end
def call
file.split("\n").map do |line|
JSON.parse(line.split("\t* \t")[1])
end
end
end