crepe/crepe — pull request #50 by stephencelis (2014-07-17 15:48:42+00:00)
Title: WIP: Add the ability to override the default handler class

When you can subclass Endpoint, you should be able to configure your API to use one as the default.

_E.g._,
``` rb
# endpoint_subclass.ru
require 'crepe'

class TestEndpoint < Crepe::Endpoint
def hello
"Hello, world!"
end
end

class TestAPI < Crepe::API
handler TestEndpoint
get { hello }
end

run TestAPI
```
``` sh
$ bundle exec backup endpoint_subclass.ru &
Puma 2.9.0 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://localhost:9292
curl :9292
::1 - - [17/Jul/2014:08:43:15 -0700] "GET / HTTP/1.1" 200 - 0.0008
"Hello, world!"
```

Because it uses `.scope`, we can scope a custom endpoint class to a specific portion of an API.

Considerations:

- I'm passing the subclass's config directly to `.scope`, which means its config will take precedence. Maybe it makes more sense to reverse merge here?

- I dunno about `.handle`, though it's succinct and works well enough. Open to other naming suggestions, though.