Sha256: 5fe0fd531f67cffa7d1c6dccd9df8a6125492dc4586bafd5c938fe0e3b592115

Contents?: true

Size: 417 Bytes

Versions: 24

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true
module Hamlit
  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

24 entries across 24 versions & 1 rubygems

Version Path
hamlit-3.0.3-java lib/hamlit/ambles.rb
hamlit-3.0.3 lib/hamlit/ambles.rb
hamlit-3.0.2-java lib/hamlit/ambles.rb
hamlit-3.0.2 lib/hamlit/ambles.rb
hamlit-3.0.1-java lib/hamlit/ambles.rb
hamlit-3.0.1 lib/hamlit/ambles.rb
hamlit-3.0.0-java lib/hamlit/ambles.rb
hamlit-3.0.0 lib/hamlit/ambles.rb
hamlit-2.16.2-java lib/hamlit/ambles.rb
hamlit-2.16.2 lib/hamlit/ambles.rb
hamlit-2.16.1-java lib/hamlit/ambles.rb
hamlit-2.16.1 lib/hamlit/ambles.rb
hamlit-2.16.0-java lib/hamlit/ambles.rb
hamlit-2.16.0 lib/hamlit/ambles.rb
hamlit-2.15.2-java lib/hamlit/ambles.rb
hamlit-2.15.2 lib/hamlit/ambles.rb
hamlit-2.15.1-java lib/hamlit/ambles.rb
hamlit-2.15.1 lib/hamlit/ambles.rb
hamlit-2.15.0-java lib/hamlit/ambles.rb
hamlit-2.15.0 lib/hamlit/ambles.rb