module Roda::RodaPlugins::Pass

  1. lib/roda/plugins/pass.rb

The pass plugin adds a request pass method to skip the current match block as if it did not match.

plugin :pass

route do |r|
  r.on "foo", :bar do |bar|
    r.pass if bar == 'baz'
    "/foo/#{bar} (not baz)"
  end

  r.on "foo/baz" do
    "/foo/baz"
  end
end