Sha256: 36e802254b1a66591eb9471928e7e665d748322d8c77d2639ac0461d61a825eb

Contents?: true

Size: 637 Bytes

Versions: 6

Compression:

Stored size: 637 Bytes

Contents

require 'hamlit/block/script_compiler'
require 'hamlit/block/silent_script_compiler'

module Hamlit
  module Block
    class Compiler < ::Hamlit::Compiler
      def initialize(options = {})
        super

        # Re-generate identity for Hamlit::Block and share it
        identity = Identity.new
        @tag_compiler = ::Hamlit::Compiler::TagCompiler.new(identity, options)

        # Replace internal compilers with Hamlit::Block's ones.
        @script_compiler        = ::Hamlit::Block::ScriptCompiler.new(identity)
        @silent_script_compiler = ::Hamlit::Block::SilentScriptCompiler.new(identity)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hamlit-block-0.8.0 lib/hamlit/block/compiler.rb
hamlit-block-0.7.1 lib/hamlit/block/compiler.rb
hamlit-block-0.7.0 lib/hamlit/block/compiler.rb
hamlit-block-0.6.0 lib/hamlit/block/compiler.rb
hamlit-block-0.5.0 lib/hamlit/block/compiler.rb
hamlit-block-0.4.0 lib/hamlit/block/compiler.rb