module Roda::RodaPlugins::Base::RequestMethods
def on(*args, &block)
end
# handle /foo/bar request
r.is 'bar' do
r.on 'foo' do
final handling for the request:
inside the match block that fully matches the path and does the
returned. However, in general you will call another routing method
executed, and when the match block returns, the rack response is
Like other routing methods, If it matches, the match block is
end
# does not match
r.on 'bar' do
end
# matches, path is /bar after matching
r.on 'foo' do
# => "/foo/bar"
r.remaining_path
not for final handling of the request.
path, this is usually used to setup branches of the routing tree,
have matched the path. Because this doesn't fully match the
Does a match on the path, matching only if the arguments
def on(*args, &block) if args.empty? always(&block) else if_match(args, &block) end end