module Roda::RodaPlugins::HashBranches::ClassMethods

def hash_branch(namespace='', segment, &block)

a block, removes the existing branch handler if it exists.
Add branch handler for the given namespace and segment. If called without
def hash_branch(namespace='', segment, &block)
  segment = "/#{segment}"
  routes = opts[:hash_branches][namespace] ||= {}
  if block
    routes[segment] = define_roda_method(routes[segment] || "hash_branch_#{namespace}_#{segment}", 1, &convert_route_block(block))
  elsif meth = routes.delete(segment)
    remove_method(meth)
  end
end