def mustache_build_folder_structure(logic_file, parent = nil)
      logic_file.each do |dir, mustaches|
        dir = [parent, dir].join("/")

        mustaches.each do |mustache|
          # Get the name of the template class
          template_class = (mustache.is_a? Hash) ? mustache.keys.first : mustache
          # Get the name of the template file
          template_file = camelcase_to_underscore(template_class)
          # If the template class is an array of other classes, then these inherit from it
          if mustache[template_class].is_a? Array
            mustache[template_class].each do |logic_file|
              if logic_file.is_a? Hash
              # If the logic file is an array, then treat it like a folder and recurse
                mustache_build_folder_structure(logic_file, dir)
              else
              # If the logic file is a single file, then render the template
                mustache_template_build(dir, template_file, logic_file)
              end
            end
          else
          # Base case: If the logic file is not an array of clases, render the template
            mustache_template_build(dir, template_file, template_class)
          end
        end
      end
    end
def mustache_build_folder_structure(logic_file, parent = nil)
      logic_file.each do |dir, mustaches|
        dir = [parent, dir].join("/")

        mustaches.each do |mustache|
          # Get the name of the template class
          template_class = (mustache.is_a? Hash) ? mustache.keys.first : mustache
          # Get the name of the template file
          template_file = camelcase_to_underscore(template_class)
          # If the template class is an array of other classes, then these inherit from it
          if mustache[template_class].is_a? Array
            mustache[template_class].each do |logic_file|
              if logic_file.is_a? Hash
              # If the logic file is an array, then treat it like a folder and recurse
                mustache_build_folder_structure(logic_file, dir)
              else
              # If the logic file is a single file, then render the template
                mustache_template_build(dir, template_file, logic_file)
              end
            end
          else
          # Base case: If the logic file is not an array of clases, render the template
            mustache_template_build(dir, template_file, template_class)
          end
        end
      end
    end
Render mustache into html for complex directory structure
 Loop through each directory matched to a set of mustache classes/subclasses