grape
https://github.com/intridea/grape
Ruby
An opinionated framework for creating REST-like APIs in Ruby.
Grape::DSL::Routing::ClassMethods#segment
Declare a "namespace", which prefixes all subordinate routes with its name. Any endpoints within a namespace, or group, resource, segment, etc., will share their parent context as well as any configuration done in the namespace context.
Edit
git clone [email protected]:intridea/grape.git
cd grape
open lib/grape/dsl/routing.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Grape--DSL--Routing--ClassMethods-segment-for-pr
# Commit to gitgit add lib/grape/dsl/routing.rbgit commit -m "better docs for Grape::DSL::Routing::ClassMethods#segment"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Grape--DSL--Routing--ClassMethods-segment-for-pr
hub pull-request
# Celebrate!