module Roda::RodaPlugins::AutoloadHashBranches::ClassMethods

def autoload_hash_branch_dir(namespace='', dir)

based on the file name.
For each .rb file in the given directory, add an autoloaded hash branch
def autoload_hash_branch_dir(namespace='', dir)
  Dir.new(dir).entries.each do |file|
    if file =~ /\.rb\z/i
      autoload_hash_branch(namespace, file.sub(/\.rb\z/i, ''), File.join(dir, file))
    end
  end
end