Sha256: abe0bc219523ab7eb17511ddc18f351b561fe8649ad75583590e106caa607d41
Contents?: true
Size: 391 Bytes
Versions: 2
Compression:
Stored size: 391 Bytes
Contents
require "cuba/rum" require "haml" require "tilt" module Cuba class Ron < Rum def _cache Thread.current[:_cache] ||= Tilt::Cache.new end def haml(template, locals = {}) _cache.fetch(template, locals) { Tilt::HamlTemplate.new("#{template}.haml") }.render(self, locals) end def session @session ||= env['rack.session'] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cuba-0.0.5 | lib/cuba/ron.rb |
cuba-0.0.4 | lib/cuba/ron.rb |