In Files

Parent

Methods

Tilt::Cache

Extremely simple template cache implementation. Calling applications create a Tilt::Cache instance and use # with any set of hashable arguments (such as those to Tilt.new):

  cache = Tilt::Cache.new
  cache.fetch(path, line, options) { Tilt.new(path, line, options) }

Subsequent invocations return the already loaded template object.

Public Class Methods

new() click to toggle source
     # File lib/tilt.rb, line 122
122:     def initialize
123:       @cache = {}
124:     end

Public Instance Methods

clear() click to toggle source
     # File lib/tilt.rb, line 130
130:     def clear
131:       @cache = {}
132:     end
fetch(*key) click to toggle source
     # File lib/tilt.rb, line 126
126:     def fetch(*key)
127:       @cache[key] ||= yield
128:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.