Sha256: 810cf588879354c3bdef2b697515e84dec1b1ed90169282c3a4cda417e8322c0
Contents?: true
Size: 529 Bytes
Versions: 4
Compression:
Stored size: 529 Bytes
Contents
# encoding: utf-8 module Nanoc::Filters # @since 3.2.0 # # @api private class Mustache < Nanoc::Filter 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
nanoc-4.0.0b2 | lib/nanoc/filters/mustache.rb |
nanoc-4.0.0b1 | lib/nanoc/filters/mustache.rb |
nanoc-4.0.0a2 | lib/nanoc/filters/mustache.rb |
nanoc-4.0.0a1 | lib/nanoc/filters/mustache.rb |