Sha256: 499a1faa0d310d18badd1472ce5ba4d3a0abd691cb2ab0584cd588da748fa0c0
Contents?: true
Size: 543 Bytes
Versions: 47
Compression:
Stored size: 543 Bytes
Contents
# frozen_string_literal: true module Nanoc::Filters # @api private class Mustache < Nanoc::Filter identifier :mustache requires 'mustache' # Runs the content through # [Mustache](https://github.com/defunkt/mustache). This method takes no # options. # # @param [String] content The content to filter # # @return [String] The filtered content def run(content, _params = {}) context = item.attributes.merge(yield: assigns[:content]) ::Mustache.render(content, context) end end end
Version data entries
47 entries across 47 versions & 1 rubygems