diff options
| author | Xinhui | 2017-03-22 11:48:36 +0100 |
|---|---|---|
| committer | Xinhui | 2017-03-22 11:48:41 +0100 |
| commit | fb7d67c9620a2f8168a0be5f6b922e2a2bf81e47 (patch) | |
| tree | 46e15b883881d79c3c93c0143cf0bde24d1d651a /lib | |
| parent | 5445d5ae221837d5a91843a758df69fcfdb899f7 (diff) | |
| download | chouette-core-fb7d67c9620a2f8168a0be5f6b922e2a2bf81e47.tar.bz2 | |
Refactoring reflex area_type condition
Refs #2789
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/stif/reflex_synchronization.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb index 68f7fc621..fee54f4c1 100644 --- a/lib/stif/reflex_synchronization.rb +++ b/lib/stif/reflex_synchronization.rb @@ -71,12 +71,15 @@ module Stif end def stop_area_area_type entry, method + from = method.last + from = 'r' if entry['OBJECT_STATUS'] == 'REFERENCE_OBJECT' + from = 'p' if entry['OBJECT_STATUS'] == 'LOCAL_OBJECT' + type = entry['TypeOfPlaceRef'] + if entry['type'] == 'Quay' - type = 'zder' if entry['OBJECT_STATUS'] == 'REFERENCE_OBJECT' - type = 'zdep' if entry['OBJECT_STATUS'] == 'LOCAL_OBJECT' + type = "zde#{from}" else - type = entry['TypeOfPlaceRef'] - type = "#{type.to_s}#{method.last}" unless type == 'LDA' + type = "zdl#{from}" if type != 'LDA' end type.downcase end |
