From 23cc4317f72c3776307ee15344462e151ba1dc52 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 9 Mar 2018 11:35:55 +0100 Subject: WayCost.new: Make `distance` and `time` arguments optional We don't have these values until after the TomTom API calculation, but we need to create `WayCost` objects before then. Give these values defaults so we don't have to set them. Refs #6095 --- lib/way_cost.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/way_cost.rb b/lib/way_cost.rb index d088b3483..b47836a28 100644 --- a/lib/way_cost.rb +++ b/lib/way_cost.rb @@ -2,9 +2,9 @@ class WayCost def initialize( departure:, arrival:, - distance:, - time:, - id:, + distance: nil, + time: nil, + id:, # TODO: calculate ID automatically ) @departure = departure @arrival = arrival -- cgit v1.2.3