lib/roda.rb in roda-2.15.0 vs lib/roda.rb in roda-2.16.0
- old
+ new
@@ -348,11 +348,11 @@
# Store the roda instance and environment.
def initialize(scope, env)
@scope = scope
@captures = []
- @remaining_path = env[PATH_INFO]
+ @remaining_path = _remaining_path(env)
super(env)
end
# Handle match block return values. By default, if a string is given
# and the response is empty, use the string as the response body.
@@ -718,9 +718,14 @@
# The regular expression to use for matching symbols. By default, any non-empty
# segment matches.
def _match_symbol_regexp(s)
SEGMENT
+ end
+
+ # The base remaining path to use.
+ def _remaining_path(env)
+ env[PATH_INFO]
end
# Backbone of the verb method support, using a terminal match if
# args is not empty, or a regular match if it is empty.
def _verb(args, &block)