class MyApp
view :viewA, :success do
end
view :viewB, :success do
end
end

Padrino

Sinatra::Views is also available as a special extension for Padrino. Padrino users are advised to install and require padrino-views and then register Padrino::Views instead. This provides automatic namespacing by controller. Views defined within a controller will be used when calling view inside a controller context. Views defined outside of a controller are global and can be accessed from everywhere, as long as there is no controller view of the same name.