If the #on method were to yield as with self yield self rather than simply yield self it would switch the entire context to self rather than just yielding self to the block. This would allow for slightly more idomatic routing as you could then do
Onyx::HTTP.on "/api" do
get "/ping", Endpoints::API::Ping
end
Instead of
Onyx::HTTP.on "/api" do |router|
router.get "/ping", Endpoints::API::Ping
end
If the
#on
method were to yield aswith self yield self
rather than simplyyield self
it would switch the entire context to self rather than just yielding self to the block. This would allow for slightly more idomatic routing as you could then doInstead of