If when looking at the pile of regexes which is Django’s router, your thought is “good, this way I can reason about types!”, then Ruby is definitely not the language for you.
No, I just implement a custom router class as the docs suggest, and move on with my life. It’s a much better use of my time than fighting mental-masturbation DSLs.