Sha256: 96d6c0f5e12b07b27509a6f73c078c11de778f86c4f07d383086827a19d62f06
Contents?: true
Size: 514 Bytes
Versions: 8
Compression:
Stored size: 514 Bytes
Contents
# encoding: utf-8 module Nanoc::Filters # @since 3.2.0 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
8 entries across 8 versions & 1 rubygems