Remove unused sequential id from shipments
This commit is contained in:
parent
c5aebc0892
commit
cdf82ad1b0
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user