Conforms to NSObject
Declared in GRMustacheTagDelegate.h

Overview

Objects conforming to the GRMustacheTagDelegate protocol can observe and alter, the rendering of Mustache tags.

Companion guide: https://github.com/groue/GRMustache/blob/master/Guides/delegate.md

Instance Methods

mustacheTag:didFailRenderingObject:withError:

Sent right after a Mustache tag has failed rendering.

- (void)mustacheTag:(GRMustacheTag *)tag didFailRenderingObject:(id)object withError:(NSError *)error

Parameters

tag

The Mustache tag that has just failed rendering.

object

The rendered object.

error

The error.

Availability

v6.0

See Also

Declared In

GRMustacheTagDelegate.h

mustacheTag:didRenderObject:as:

Sent after a Mustache tag has rendered.

- (void)mustacheTag:(GRMustacheTag *)tag didRenderObject:(id)object as:(NSString *)rendering

Parameters

tag

The Mustache tag that has just rendered.

object

The rendered object.

rendering

The actual rendering

Availability

v6.0

See Also

Declared In

GRMustacheTagDelegate.h

mustacheTag:willRenderObject:

Sent before a Mustache tag renders.

- (id)mustacheTag:(GRMustacheTag *)tag willRenderObject:(id)object

Parameters

tag

The Mustache tag about to render.

object

The object about to be rendered.

Return Value

The object that should be rendered.

Availability

v6.0

Discussion

This method gives an opportunity to alter objects that are rendered.

For example, it is implemented by the NSFormatter class, in templates like {{# dateFormatter }}...{{ value }}...{{ value }}... {{/}}.

See Also

Declared In

GRMustacheTagDelegate.h