Sha256: 3825c2145c697f37874c20a8369389b2254986857bda4745b71d7cd831716193
Contents?: true
Size: 511 Bytes
Versions: 20
Compression:
Stored size: 511 Bytes
Contents
module Nanoc::Filters # @api private class Mustache < Nanoc::Filter identifier :mustache requires 'mustache' # Runs the content through # [Mustache](http://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
20 entries across 20 versions & 1 rubygems