This extension is part of the Sinatra::Contrib project. Run gem install sinatra-contrib to have it available.

Adds methods like `haml?` that allow helper methods to check whether they are called from within a template.