Created
August 23, 2011 06:10
-
-
Save pr1001/1164460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Page(val id: String) extends Iterable[Page] { | |
def URLMatch(req: Request): Option[Page] = { | |
req match { | |
case r if urlParamMatches(r) => Some(this) | |
case r if urlPatternMatches(r) => Some(this) | |
case r if parent.isDefined => parent.get.URLMatch(r) | |
case _ => None | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment