cuke test roundabout exit nr

This commit is contained in:
Emil Tin
2013-07-30 17:58:00 +02:00
parent cb28b2de07
commit a45215ddf2
3 changed files with 25 additions and 21 deletions
+7 -3
View File
@@ -122,9 +122,13 @@ def turn_list instructions
16 => :enter_contraflow,
17 => :leave_contraflow
}
instructions.
map { |r| types[r[0].to_i].to_s }.
join(',')
# replace instructions codes with strings
# "11-3" (enter roundabout and leave a 3rd exit) gets converted to "enter_roundabout-3"
instructions.map do |r|
r[0].to_s.gsub!(/^\d*/) do |match|
types[match.to_i].to_s
end
end.join(',')
end
def mode_list instructions