GBDictionaryTemplateLoader Class Reference

Inherits from GRMustacheTemplateLoader
Declared in GBDictionaryTemplateLoader.h<br />GBDictionaryTemplateLoader.m

Overview

Encapsulates template loading with partials provided through a dictionary.

This is almost straight from GRMustache example, with just a bit of cleanup and garbage collector modifications. Although the functionality could easily be implemented by GBTemplateHandler , it was moved to a separate class to better encapsulate GRMustache logic and prevent bloating public interface of GBTemplateHandler with all specifics of GRMustacheTemplateLoader that are not needed for creating output.

Tasks

Initialization & disposal

Other Methods

Class Methods

loaderWithDictionary:

Returns a new autoreleased GBDictionaryTemplateLoader instance.

+ (id)loaderWithDictionary:(NSDictionary *)partials

Discussion

Returns a new autoreleased GBDictionaryTemplateLoader instance.

Declared In

GBDictionaryTemplateLoader.h
GBDictionaryTemplateLoader.m

Instance Methods

initWithDictionary:

Initializes the template loader with the given dictionary of partials.

- (id)initWithDictionary:(NSDictionary *)partials

Parameters

partials
The dictionary of all partials.

Return Value

Returns initialized instance.

Discussion

Initializes the template loader with the given dictionary of partials.

Declared In

GBDictionaryTemplateLoader.h
GBDictionaryTemplateLoader.m

templateIdForTemplateNamed:relativeToTemplateId:

templateStringForTemplateId:error: