Sha256: 5f5ed5112a04948d967a203c81cfc12afc49242f4e12c14ecbd6361bfb7f0e8a
Contents?: true
Size: 568 Bytes
Versions: 12
Compression:
Stored size: 568 Bytes
Contents
# encoding: utf-8 module Nanoc3::Filters class Erubis < Nanoc3::Filter # Runs the content through [Erubis](http://www.kuwata-lab.com/erubis/). # This method takes no options. # # @param [String] content The content to filter # # @return [String] The filtered content def run(content, params={}) require 'erubis' # Create context context = ::Nanoc3::Context.new(assigns) # Get result ::Erubis::Eruby.new(content, :filename => filename).result(context.get_binding { assigns[:content] }) end end end
Version data entries
12 entries across 12 versions & 1 rubygems