title: Sinatra: How to set namespace for base class
body: <p>How to organize controllers hierarchy so that get something like this:</p>
  
  <pre><code>class ApplicationController &lt; Sinatra::Application
    set :namespace, '/api' # ???
  end
  
  class UsersController &lt; AplicationController
    namespace '/users' do
      # /api/users/show
      get '/show' do
        # blablabla
      end
    end
  end
  
  class PostsController &lt; ApplicationController
    namespace '/posts' do
      # /api/posts/show
      get '/posts' do
        # blablabla
      end
    end
  end
  </code></pre>
  
  <p>I'm mostly worked with Rails and dont know it is possible to do in Sinatra. </p>