test for mode flag (todo)

This commit is contained in:
Emil Tin
2013-03-18 15:37:10 +01:00
parent 46c3ce0e34
commit 081831e6ea
4 changed files with 129 additions and 1 deletions
+10 -1
View File
@@ -108,9 +108,18 @@ def turn_list instructions
12 => :leave_roundabout,
13 => :stay_roundabout,
14 => :start_end_of_street,
15 => :destination
15 => :destination,
16 => :enter_contraflow,
17 => :leave_contraflow
}
instructions.
map { |r| types[r[0].to_i].to_s }.
join(',')
end
def mode_list instructions
instructions.reject { |r| r[0].to_s=="#{DESTINATION_REACHED}" }.
map { |r| r[8] }.
map { |r| (r=="" || r==nil) ? '""' : r }.
join(',')
end