module Roda::RodaPlugins::PlaceholderStringMatchers

  1. lib/roda/plugins/placeholder_string_matchers.rb

The placeholder_string_matcher plugin exists for backwards compatibility with previous versions of Roda that allowed placeholders inside strings if they were prefixed by colons:

plugin :placeholder_string_matchers
route do |r|"foo/:bar") |v|
    # matches foo/baz, yielding "baz"
    # does not match foo, foo/, or foo/baz/

It is not recommended to use this in new applications, and it is encouraged to use separate string class or symbol matchers instead: "foo", String "foo", :bar


Public Class

  1. load_dependencies

Public Class methods

load_dependencies (app)
[show source]
# File lib/roda/plugins/placeholder_string_matchers.rb, line 24
def self.load_dependencies(app)
  app.plugin :_symbol_regexp_matchers