No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
routes
tmp
.gitignore
Gemfile
Gemfile.lock
README.md
config.ru
tinker.rb

README.md

Tinker

A small example of namespaced routes with sinatra

how it works

everything in routes/*.rb should look like:

routes/foo.rb:

module Tinker
  module FooRoutes
    NAMESPACE = "/foo"

    def self.registered(app)
      app.get "#{NAMESPACE}/" do
        "Base of FOO"
      end
    end
  end
end

It will magically suck them up and include them in your routes

Thanks

to this stack overflow answer.

and

this method from Mustache.rb