module Roda::RodaPlugins::MultiRoute::ClassMethods

def freeze

Freeze the multi_route regexp matchers so that there can be no thread safety issues at runtime.
def freeze
  super
  opts[:namespaced_routes].each_key do |k|
    self::RodaRequest.named_route_regexp(k)
  end
  self::RodaRequest.instance_variable_get(:@namespaced_route_regexps).freeze
  self
end

def inherited(subclass)

Copy the named routes into the subclass when inheriting.
def inherited(subclass)
  super
  subclass::RodaRequest.instance_variable_set(:@namespaced_route_regexps, {})
end

def route(name=nil, namespace=nil, &block)

Clear the multi_route regexp matcher for the namespace.
def route(name=nil, namespace=nil, &block)
  super
  if name
    self::RodaRequest.clear_named_route_regexp!(namespace)
  end
end