diff options
| author | Teddy Wing | 2018-03-09 11:35:55 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-03-14 16:38:39 +0100 |
| commit | 23cc4317f72c3776307ee15344462e151ba1dc52 (patch) | |
| tree | e5c6ec923a773ab8679434aa075dfc1a1f65170b | |
| parent | fc1ca7bf99810717c1e64fb0c8654c5489d389ef (diff) | |
| download | chouette-core-23cc4317f72c3776307ee15344462e151ba1dc52.tar.bz2 | |
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
| -rw-r--r-- | lib/way_cost.rb | 6 |
1 files 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 |
