Sha256: 1e288d1cb8cfd6c3667082010aaa75603946d42461810d72b8b2edea7d5fefe3
Contents?: true
Size: 510 Bytes
Versions: 39
Compression:
Stored size: 510 Bytes
Contents
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
39 entries across 39 versions & 1 rubygems