Sha256: 63275d630d9182a14e2746a8a9ea8a396a028bff8c7b2c4f541db4d30c1ca539

Contents?: true

Size: 300 Bytes

Versions: 3

Compression:

Stored size: 300 Bytes

Contents

require 'mustache'

module Tilt
  class MustacheTemplate < Template
    def initialize_engine; end

    def prepare; end

    def evaluate(scope, locals, &block)
      Mustache.render(data, locals.merge(scope.is_a?(Hash) ? scope : {}).merge(:yield => block.nil? ? '' : block.call))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pieces-0.2.2 lib/tilt/mustache.rb
pieces-0.2.1 lib/tilt/mustache.rb
pieces-0.2.0 lib/tilt/mustache.rb