Sha256: 4e25f0014320a483532ba22acc83584e5886c1040f0321a902bf96b2a2922351

Contents?: true

Size: 812 Bytes

Versions: 49

Compression:

Stored size: 812 Bytes

Contents

require 'tilt'

module Temple
  module Templates
    class Tilt < ::Tilt::Template
      extend Mixins::Template

      # Prepare Temple template
      #
      # Called immediately after template data is loaded.
      #
      # @return [void]
      def prepare
        @src = self.class.build_engine({ :streaming => false, # Overwrite option: No streaming support in Tilt
                                         :file => eval_file }, options).call(data)
      end

      # A string containing the (Ruby) source code for the template.
      #
      # @param [Hash]   locals Local variables
      # @return [String] Compiled template ruby code
      def precompiled_template(locals = {})
        @src
      end

      def self.register_as(name)
        ::Tilt.register name.to_s, self
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

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