Module: Roda::RodaPlugins::HashMatcher
- Defined in:
- lib/roda/plugins/hash_matcher.rb
Overview
The hash_matcher plugin adds the hash_matcher class method, which allows for easily defining hash matchers:
class App < Roda
hash_matcher(:foo) do |v|
params['foo'] == v
end
route do
r.on foo: 'bar' do
# matches when param foo has value bar
end
end
end
Defined Under Namespace
Modules: ClassMethods