module Roda::RodaPlugins::MatchHookArgs::ClassMethods

def add_match_hook(&block)

Add a match hook that will be called with matchers and block args.
def add_match_hook(&block)
  opts[:match_hook_args] << define_roda_method("match_hook_args", :any, &block)
  if opts[:match_hook_args].length == 1
    class_eval("alias _match_hook_args #{opts[:match_hook_args].first}", __FILE__, __LINE__)
  else
    class_eval("def _match_hook_args(v, a); #{opts[:match_hook_args].map{|m| "#{m}(v, a)"}.join(';')} end", __FILE__, __LINE__)
  end
  public :_match_hook_args
  nil
end