le0pard/mongodb_logger

View on GitHub
lib/mongodb_logger/server/views/shared/layout/_mustache.erb

Summary

Maintainability
Test Coverage
<script type="text/javascript">
  window.MustacheTemplates = {};
  <% Dir["#{File.expand_path(File.join(@main_dir, "server", "templates"))}/**/*.mustache"].each do |template| %>
    window.MustacheTemplates[<%= template.split(File::SEPARATOR).last(2).join("/").gsub(".mustache", "").inspect %>] = Mustache.compile(<%= File.open(template, 'rb').read.inspect %>);
  <% end %>
</script>