I've just send a question to the Sinatra mailing list:
Would it be possible to sub-class or mixin an app designed at the top level of the Sinatra DSL into a Sinatra::Base subclass?
For example, I'm impressed with Nesta and want to work with it some more, but I'm used to working with apps developed as a subclass of Sinatra::Base. I've previously forked Nesta and modified it into a subclass. That worked OK but I ran into some unrelated issues, and am finding the task of keeping in line with the upstream git repo daunting.
The Mickey Mouse hacker in me would try slurping the file and eval'ing it within a module. That has serious limitations, though.
I'd venture to guess that there is a more elegant solution. Any ideas?