diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-15 15:00:32 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-15 15:00:32 +0200 |
commit | e833e6d3fa4b46b57feae0b26002f3461e6a5191 (patch) | |
tree | 5e1ae9a910e41aec65d9ec3ad964cf09db674ac9 /lib/evendoors/room.rb | |
parent | 2f4949708217d9434acd4973af2cc9032e451fd7 (diff) | |
download | edoors-ruby-e833e6d3fa4b46b57feae0b26002f3461e6a5191.zip edoors-ruby-e833e6d3fa4b46b57feae0b26002f3461e6a5191.tar.gz |
Room: implement drill down
Diffstat (limited to 'lib/evendoors/room.rb')
-rw-r--r-- | lib/evendoors/room.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/evendoors/room.rb b/lib/evendoors/room.rb index 8b62c24..f865136 100644 --- a/lib/evendoors/room.rb +++ b/lib/evendoors/room.rb @@ -119,9 +119,13 @@ module EvenDoors else p.error! EvenDoors::ERROR_ROUTE_RRWD end - elsif (p.room=~/^#{path}/)==0 - # TODO allow drill down ?!? - p.error! EvenDoors::ERROR_ROUTE_RRNDD + elsif (p.room=~/^#{path}\/(.*)/)==0 + room, *more = $1.split EvenDoors::PATH_SEP + if r=@spots[room] + r.route_p p + else + p.error! EvenDoors::ERROR_ROUTE_DDWR + end elsif @parent @parent.route_p p else |