Sha256: 34adb0a6df2f4b8ed0ba957206e54c9b23a3f7b94d69c4f176744bda2dc1b288

Contents?: true

Size: 465 Bytes

Versions: 8

Compression:

Stored size: 465 Bytes

Contents

# encoding: utf-8

require 'mustache'

module Nanoc3::Filters

  # @since 3.2.0
  class Mustache < Nanoc3::Filter

    # 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={})
      # Get result
      ::Mustache.render(content, item.attributes)
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc3-3.2.4 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.3 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.2 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.1 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.0 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.0b3 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.0b2 lib/nanoc3/filters/mustache.rb
nanoc3-3.2.0b1 lib/nanoc3/filters/mustache.rb