Sha256: 69e37e13ec294b938f1628072df0d689006418d323cf3b993a301fad071e1635

Contents?: true

Size: 463 Bytes

Versions: 8

Compression:

Stored size: 463 Bytes

Contents

# encoding: utf-8

require 'mustache'

module Nanoc::Filters

  # @since 3.2.0
  class Mustache < Nanoc::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
nanoc-3.3.7 lib/nanoc/filters/mustache.rb
nanoc-3.3.6 lib/nanoc/filters/mustache.rb
nanoc-3.3.5 lib/nanoc/filters/mustache.rb
nanoc-3.3.4 lib/nanoc/filters/mustache.rb
nanoc-3.3.3 lib/nanoc/filters/mustache.rb
nanoc-3.3.2 lib/nanoc/filters/mustache.rb
nanoc-3.3.1 lib/nanoc/filters/mustache.rb
nanoc-3.3.0 lib/nanoc/filters/mustache.rb