Sha256: c0cbdc285a7a82745597dd2878e846a0a006e4667dd9f2c4a6c22fa909daa298

Contents?: true

Size: 515 Bytes

Versions: 3

Compression:

Stored size: 515 Bytes

Contents

#
# Setup Slim
require 'slim'
::Slim::Engine.set_default_options pretty: true

module RevealCK
  module Templates
    #
    # Public: A Processor is given a template and expected to render
    # it.
    #
    class Processor

      require 'tilt'

      def initialize(file)
        @template = Tilt.new file
      end

      def output(locals = {})
        scope = RenderScope.new
        @template.render scope, locals
      end

      def self.open(file)
        Processor.new file
      end

    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reveal-ck-0.2.0 lib/reveal-ck/templates/processor.rb
reveal-ck-0.1.8 lib/reveal-ck/templates/processor.rb
reveal-ck-0.1.7 lib/reveal-ck/templates/processor.rb