Documentation of rendering objects: https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// helper function for silentValueForKey | |
id silentValueForUndefinedKey(id self, SEL _cmd, NSString *key) { | |
return nil; | |
} | |
// The purpose of this function is to have the same result as | |
// [object valueForKey:key], but instead of letting [NSObject valueForUndefinedKey:] | |
// raise an NSUndefinedKeyException, it silently returns nil instead. | |
id silentValueForKey(id object, NSString *key) { | |
// Does object provide the same implementations of valueForKey: and valueForUndefinedKey: as NSObject? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layout.mustache: | |
<html> | |
<head><title>{{{$yield title}}}</title></head> | |
<body> | |
{{>navigation}} | |
<div class="content"> | |
{{{$yield}}} | |
</div> | |
{{>footer}} | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
super.mustache: | |
<html> | |
<head><title>{{{title}}}</title></head> | |
<body> | |
{{>navigation}} | |
<div class="content"> | |
{{{content}}} | |
</div> | |
{{>footer}} | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#movie}} | |
{{link}} | |
{{#director}} | |
by {{link}} | |
{{/director}} | |
{{/movie}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{movie}} |
Documentation of overridable partials: https://github.com/groue/GRMustache/blob/master/Guides/partials.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{movies}} {{! one movie is not enough }} |
Documentation of filters: https://github.com/groue/GRMustache/blob/master/Guides/filters.md
Hello,
I'm working on a class that synthesizes its own property accessors when the user subclasses it, and declares properties @dynamic.
That class is part of the GRMustache library, and is documented in https://github.com/groue/GRMustache/blob/master/Guides/view_model.md
Today, the current implementation works, and is robust. The end user has a very simple API - he just has to declare dynamic properties in order to be granted with the features he needs. I'm quite happy of that.
OlderNewer