1
0

Remove unused sequential id from shipments

This commit is contained in:
Tim Kächele 2024-08-27 18:01:44 +02:00
parent c5aebc0892
commit cdf82ad1b0

View File

@ -2,7 +2,6 @@ module PlanetExpressExpress
require "date" require "date"
class ShipmentReader class ShipmentReader
Shipment = Struct.new( Shipment = Struct.new(
:id,
:date, :date,
:size, :size,
:provider, :provider,
@ -57,7 +56,6 @@ module PlanetExpressExpress
parts = line.split(" ") parts = line.split(" ")
shipment = Shipment.new( shipment = Shipment.new(
id: sequential_id,
date: Date.strptime(parts[0], "%Y-%m-%d"), date: Date.strptime(parts[0], "%Y-%m-%d"),
size: parts[1]&.to_sym, size: parts[1]&.to_sym,
provider: parts[2]&.to_sym, provider: parts[2]&.to_sym,
@ -73,9 +71,5 @@ module PlanetExpressExpress
shipment shipment
end end
def sequential_id
@id += 1
end
end end
end end