Module: Roda::RodaPlugins::Pass

Defined in:
lib/roda/plugins/pass.rb

Overview

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

Defined Under Namespace

Modules: RequestMethods