sam/harbor — Issue #17: routes should use Method#parameters
Author: sam
Created: 2012-02-28 06:27:59+00:00
State: open
Labels: upgrade

Routes should use `Method#parameters` to inject wildcards into arguments when an action is called.

I should be able to do this for example:

# This action just echoes the parameter you provide:
get "/:echo" do |echo|
response.puts echo
end

This is acheivable because Ruby 1.9 provides a `#parameters` method for `Proc` and `UnboundMethod`. It's basically bringing [Merb Action Args](http://technicalpickles.com/posts/meet-merb-action-methods-taking-arguments/) back from the dead, which were themselves inspired by [CastleProject's Simple Parameter Passing](http://docs.castleproject.org/MonoRail.Getting-Started.ashx#Simple_Parameters_11). Except this time around we don't have to use `ParseTree` since Ruby 1.9 has more robust reflection support.