aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorTeddy Wing2017-05-24 10:49:49 +0200
committerTeddy Wing2017-05-26 13:20:55 +0200
commita1b8b9801e58bce5c435424b171072e3a27f612d (patch)
treeb7d6c233e089ce5ee15e8d81866df85333d4bf58 /script
parent042ebd41117798c02eb54919d97dc7eba01724d3 (diff)
downloadchouette-core-a1b8b9801e58bce5c435424b171072e3a27f612d.tar.bz2
Create `TimeDuration` module for `#exceeds_gap?` method
Put the `exceeds_gap?` method in a new module called `TimeDuration`. This will allow us to use it from both the `Chouette::VehicleJourneyAtStop` class and from the `IncreasingTimeOrderValidator`. Doing this also allows us to test it independently. Haven't yet rewritten the increasing times validator to take advantage of this new method, but adding it now to ensure we don't get an error calling a non-existent method in `VehicleJourneyAtStop`. I changed the signature of the method to take a duration as its first argument. This allows us to set arbitrary durations to compare against and surfaces the duration when reading code where the method is called. Not sure if that's the best approach here, but it seems to make sense for now. Refs #870
Diffstat (limited to 'script')
0 files changed, 0 insertions, 0 deletions