Sha256: 7c4a350f601cdd25e452c9b6d967d27d01a56579fdc195a27e58d3f149b7b88d

Contents?: true

Size: 551 Bytes

Versions: 52

Compression:

Stored size: 551 Bytes

Contents

module Temple
  module Mixins
    # @api private
    module Template
      include DefaultOptions

      def engine(engine = nil)
        default_options[:engine] = engine if engine
        default_options[:engine]
      end

      def build_engine(*options)
        raise 'No engine configured' unless engine
        options << default_options
        engine.new(ImmutableHash.new(*options))
      end

      def chain(&block)
        chain = (default_options[:chain] ||= [])
        chain << block if block
        chain
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.7.4 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.7.3 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.7.2 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.7.1 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.7.0 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.9 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.8 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.7 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.6 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.5 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.4 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.3 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.2 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.1 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.6.0 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.5.17 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.5.16 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.5.15 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb
classiccms-0.5.14 vendor/bundle/gems/temple-0.4.0/lib/temple/mixins/template.rb