crepe/crepe — pull request #49 by kainosnoema (2014-07-17 05:57:00+00:00)
Title: Mount Endpoint subclasses instead of instances

Multiple benefits:

- Increases composability and flexibility. If desired, Crepe::Endpoint can
even be subclassed (like `Crepe::API`) and mounted in any Rack framework.

- Consistency and discoverability. Now, both `API` and `Endpoint` are
subclassed in a similar way, and discoverable, readable constants are
created for these subclasses for easier introspection.

- Future API possibilities. We could potentially allow Endpoints to be used
instead of blocks when defining an API: `get '/user', with: UserEndpoint`

- Performance. It's hard to benchmark this precisely, but I'm seeing anywhere
from 5-10% improvement. Nothing to laugh at.