lib/roda/plugins/type_routing.rb
# Removes a trailing file extension from the path, and sets
# the requested type if so.
Removes a trailing file extension from the path, and sets
the requested type if so.
Removes a trailing file extension from the path and sets the requested type if so .
def _remaining_path(env)
          opts = scope.opts[:type_routing]
          path = super
          if opts[:use_extension]
            if m = opts[:extension_regexp].match(path)
              @type_routing_extension =  @requested_type = m[2].to_sym
              path = m[1]
            end
          end
          path
        end
def _remaining_path ( env ) opts = scope . opts [ :type_routing ] path = super if opts [ :use_extension ] if m = opts [ :extension_regexp ] . match ( path ) @type_routing_extension = @requested_type = m [ 2 ] . to_sym path = m [ 1 ] end end path end
Removes a trailing file extension from the path, and sets
the requested type if so.
Removes a trailing file extension from the path and sets the requested type if so .
env