Sha256: eaba205400b781f90946daaae528191673befeae96b39ac593cf7cf2934c9800

Contents?: true

Size: 406 Bytes

Versions: 10

Compression:

Stored size: 406 Bytes

Contents

# encoding: utf-8

module Nanoc3::Filters
  class Haml < Nanoc3::Filter

    def run(content, params={})
      require 'haml'

      # Get options
      options = params.merge(:filename => filename)

      # Create context
      context = ::Nanoc3::Extra::Context.new(assigns)

      # Get result
      ::Haml::Engine.new(content, options).render(context, assigns) { assigns[:content] }
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nanoc3-3.0.9 lib/nanoc3/filters/haml.rb
nanoc3-3.0.8 lib/nanoc3/filters/haml.rb
nanoc3-3.0.7 lib/nanoc3/filters/haml.rb
nanoc3-3.0.6 lib/nanoc3/filters/haml.rb
nanoc3-3.0.5 lib/nanoc3/filters/haml.rb
nanoc3-3.0.4 lib/nanoc3/filters/haml.rb
nanoc3-3.0.3 lib/nanoc3/filters/haml.rb
nanoc3-3.0.2 lib/nanoc3/filters/haml.rb
nanoc3-3.0.1 lib/nanoc3/filters/haml.rb
nanoc3-3.0.0 lib/nanoc3/filters/haml.rb