Sha256: eaea8586fccc94da6c638af2dc70f83c7c2b05703f8d7b4adf61c91ed306e093
Contents?: true
Size: 357 Bytes
Versions: 2
Compression:
Stored size: 357 Bytes
Contents
module Slim class Engine include Compiler attr_reader :compiled # @param template The .slim template to convert # @return [Slim::Engine] instance of engine def initialize(template) @template = template compile end def render(scope = Object.new, locals = {}) scope.instance_eval(compiled) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slim-0.2.0 | lib/slim/engine.rb |
slim-0.1.0 | lib/slim/engine.rb |