Method: Arrow::TemplateFactory#initialize

Defined in:
lib/arrow/templatefactory.rb

#initialize(config) ⇒ TemplateFactory

Create a new TemplateFactory from the given configuration object, which should specify a loader class for templates.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/arrow/templatefactory.rb', line 56

def initialize( config )
	@config = config
	@cache = nil
	
	if config.templates.cache
		@cache = Arrow::Cache.new(
			"Template Factory",
			config.templates.cacheConfig,
			&method(:template_expiration_hook) )
	end

	@loader = self.class.build_template_loader( config )
	@path = config.templates.path

	super()
end