module Roda::RodaPlugins::Base::ClassMethods
def hash_matcher(key, &block)
end
end
# matches when param foo has value bar
r.on :foo=>'bar' do
route do
end
self['foo'] == v
hash_matcher(:foo) do |v|
class App < Roda
match, and anything else to match.
call the block. The block should return nil or false to not
block, so that using a hash key in a request match method will
Create a match_#{key} method in the request class using the given
def hash_matcher(key, &block) request_module{define_method(:"match_#{key}", &block)} end