Sha256: 35c91d67e62bc6f4fcc5d00652feb217cbb469b06abe9e2e5f8d105a4c823652

Contents?: true

Size: 415 Bytes

Versions: 47

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true
module Haml
  class Ambles < Temple::Filter
    define_options :preamble, :postamble

    def initialize(*)
      super
      @preamble = options[:preamble]
      @postamble = options[:postamble]
    end

    def call(ast)
      ret = [:multi]
      ret << [:static, @preamble] if @preamble
      ret << ast
      ret << [:static, @postamble] if @postamble
      ret
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
haml-6.3.0 lib/haml/ambles.rb
haml-6.2.5 lib/haml/ambles.rb
haml-6.2.4 lib/haml/ambles.rb
haml-6.2.3 lib/haml/ambles.rb
haml-6.2.2 lib/haml/ambles.rb
haml-6.2.1 lib/haml/ambles.rb
haml-6.2.0 lib/haml/ambles.rb
haml-6.1.4-java lib/haml/ambles.rb
haml-6.1.4 lib/haml/ambles.rb
haml-6.1.3-java lib/haml/ambles.rb
haml-6.1.3 lib/haml/ambles.rb
haml-6.1.2-java lib/haml/ambles.rb
haml-6.1.2 lib/haml/ambles.rb
haml-6.1.1-java lib/haml/ambles.rb
haml-6.1.1 lib/haml/ambles.rb
haml-6.1.0-java lib/haml/ambles.rb
haml-6.1.0 lib/haml/ambles.rb
haml-6.0.12-java lib/haml/ambles.rb
haml-6.0.12 lib/haml/ambles.rb
haml-6.0.11-java lib/haml/ambles.rb