Sha256: 384f4f4380542d3f1d07d612a18178e8dab1b8795d2069e066091cd88f9fdb4a
Contents?: true
Size: 751 Bytes
Versions: 10
Compression:
Stored size: 751 Bytes
Contents
# # Setup Slim require 'slim' ::Slim::Engine.set_default_options pretty: true require 'tilt' module RevealCK module Templates # Public: A Processor is given a template and expected to render # it. class Processor include Retrieve attr_reader :config def initialize(args) file, @config = retrieve(:file, args), retrieve(:config, args) @template = Tilt.new file end def output(locals = {}) scope = RevealCK::Render::Scope.new(dir: Dir.pwd, config: config) @template.render scope, locals end def self.open(args) file, config = retrieve(:file, args), retrieve(:config, args) Processor.new(file: file, config: config) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems