module Roda::RodaPlugins::HashBranchViewSubdir::ClassMethods
def hash_branch(namespace='', segment, &block)
by modifying the generated method to append the view subdirectory before
Automatically append a view subdirectory for a successful hash_branch route,
def hash_branch(namespace='', segment, &block) meths = opts[:hash_branch_view_subdir_methods][namespace] ||= {} if block meth = meths[segment] = define_roda_method(meths[segment] || "_hash_branch_view_subdir_#{namespace}_#{segment}", 1, &convert_route_block(block)) super do |*_| append_view_subdir(segment) send(meth, @_request) end else if meth = meths.delete(segment) remove_method(meth) end super end end