Skip to content
Browse files

v4.3.0

  • Loading branch information...
1 parent d334399 commit a3a88b4b06b8457af1b51876a7bab71f103e0d4a @groue committed Aug 4, 2012
View
2 README.md
@@ -3,7 +3,7 @@ GRMustache
GRMustache is a production-ready implementation of [Mustache](http://mustache.github.com/) templates for MacOS Cocoa and iOS.
-**July 27th, 2012: GRMustache 4.2.0 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
+**August 4th, 2012: GRMustache 4.3.0 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
Breaking news on Twitter: http://twitter.com/GRMustache
View
41 RELEASE_NOTES.md
@@ -3,6 +3,47 @@ GRMustache Release Notes
You can compare the performances of GRMustache versions at https://github.com/groue/GRMustacheBenchmark.
+## v4.3.0
+
+**Filters**
+
+[Filters](Guides/filters.md) are an extension to the [Mustache specification](https://github.com/mustache/spec) that is currently under active [discussion](http://github.com/mustache/spec/issues/41).
+
+Filters allow you to process values before they are rendered, and supersede "section delegates" as the preferred way to filter values. The [number formatting](Guides/sample_code/number_formatting.md) and [array indexes.md](Guides/sample_code/indexes.md) sample codes have been updated accordingly.
+
+**New APIs**:
+
+``objc
+@interface GRMustacheSection: NSObject
+- (NSString *)renderTemplateString:(NSString *)string error:(NSError **)outError;
+@end
+
+@interface GRMustacheTemplate: NSObject
++ (NSString *)renderObject:(id)object withFilters:(id)filters fromString:(NSString *)templateString error:(NSError **)outError;
++ (NSString *)renderObject:(id)object withFilters:(id)filters fromContentsOfFile:(NSString *)path error:(NSError **)outError;
++ (NSString *)renderObject:(id)object withFilters:(id)filters fromContentsOfURL:(NSURL *)url error:(NSError **)outError;
++ (NSString *)renderObject:(id)object withFilters:(id)filters fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError;
++ (NSString *)renderObject:(id)object withFilters:(id)filters fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError;
+- (NSString *)renderObject:(id)object withFilters:(id)filters;
+- (NSString *)renderObjectsInArray:(NSArray *)objects;
+- (NSString *)renderObjectsInArray:(NSArray *)objects withFilters:(id)filters;
+@end
+```
+
+**Deprecated APIs**:
+
+``objc
+@interface GRMustacheSection: NSObject
+// Use renderTemplateString:error: instead.
+@property (nonatomic, retain, readonly) id renderingContext;
+@end
+
+@interface GRMustacheTemplate: NSObject
+// Use renderObjectsInArray: instead.
+- (NSString *)renderObjects:(id)object, ...;
+@end
+```
+
## v4.2.0
**Section delegates**
View
2 Reference/html/Classes/GRMustache.html
@@ -305,7 +305,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
- <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-07-01)</span><br />
+ <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-08-04)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
View
333 Reference/html/Classes/GRMustacheFilter.html
@@ -0,0 +1,333 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
+ <title>GRMustacheFilter Class Reference</title>
+ <meta id="xcode-display" name="xcode-display" content="render"/>
+ <meta name="viewport" content="width=550" />
+ <link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
+ <link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
+ <meta name="generator" content="appledoc 2.0.5 (build 789)" />
+ </head>
+ <body>
+ <header id="top_header">
+ <div id="library" class="hideInXcode">
+ <h1><a id="libraryTitle" href="../index.html">GRMustache </a></h1>
+ <a id="developerHome" href="../index.html">Gwendal Roué</a>
+ </div>
+
+ <div id="title" role="banner">
+ <h1 class="hideInXcode">GRMustacheFilter Class Reference</h1>
+ </div>
+ <ul id="headerButtons" role="toolbar">
+ <li id="toc_button">
+ <button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
+ </li>
+ <li id="jumpto_button" role="navigation">
+ <select id="jumpTo">
+ <option value="top">Jump To&#133;</option>
+
+ <option value="overview">Overview</option>
+
+
+
+
+ <option value="tasks">Tasks</option>
+
+
+
+
+
+
+
+ <option value="class_methods">Class Methods</option>
+
+ <option value="//api/name/filterWithBlock:">&nbsp;&nbsp;&nbsp;&nbsp;+ filterWithBlock:</option>
+
+
+
+
+
+</select>
+ </li>
+ </ul>
+ </header>
+ <nav id="tocContainer" class="isShowingTOC">
+ <ul id="toc" role="tree">
+
+<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
+
+
+
+
+<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
+
+</ul></li>
+
+
+
+
+
+
+
+<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
+
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/filterWithBlock:">filterWithBlock:</a></span></li>
+
+</ul></li>
+
+
+
+
+ </ul>
+ </nav>
+ <article>
+ <div id="contents" class="isShowingTOC" role="main">
+ <a title="GRMustacheFilter Class Reference" name="top"></a>
+ <div class="main-navigation navigation-top">
+ <ul>
+ <li><a href="../index.html">Index</a></li>
+ <li><a href="../hierarchy.html">Hierarchy</a></li>
+</ul>
+ </div>
+ <div id="header">
+ <div class="section-header">
+ <h1 class="title title-header">GRMustacheFilter Class Reference</h1>
+ </div>
+ </div>
+ <div id="container">
+
+ <div class="section section-specification"><table cellspacing="0"><tbody>
+ <tr>
+ <td class="specification-title">Inherits from</td>
+ <td class="specification-value">NSObject</td>
+</tr><tr>
+ <td class="specification-title">Conforms to</td>
+ <td class="specification-value"><a href="../Protocols/GRMustacheFilter.html">GRMustacheFilter</a></td>
+</tr><tr>
+ <td class="specification-title">Declared in</td>
+ <td class="specification-value">GRMustacheFilter.h</td>
+</tr>
+ </tbody></table></div>
+
+
+
+
+ <div class="section section-overview">
+ <a title="Overview" name="overview"></a>
+ <h2 class="subtitle subtitle-overview">Overview</h2>
+ <p>The GRMustacheFilter class helps building mustache filters without writing a
+custom class that conforms to the GRMustacheFilter protocol.</p>
+
+<p><strong>Companion guide:</strong> <a href="https://github.com/groue/GRMustache/blob/master/Guides/runtime/filters.md">https://github.com/groue/GRMustache/blob/master/Guides/runtime/filters.md</a></p>
+ </div>
+
+
+
+
+
+ <div class="section section-tasks">
+ <a title="Tasks" name="tasks"></a>
+ <h2 class="subtitle subtitle-tasks">Tasks</h2>
+
+
+
+
+
+ <ul class="task-list">
+ <li>
+ <span class="tooltip">
+ <code><a href="#//api/name/filterWithBlock:">+&nbsp;filterWithBlock:</a></code>
+ <span class="tooltip"><p>Returns a GRMustacheFilter object that executes the provided block when
+tranforming a value.</p></span>
+ </span>
+
+
+</li>
+ </ul>
+
+ </div>
+
+
+
+
+
+
+
+ <div class="section section-methods">
+ <a title="Class Methods" name="class_methods"></a>
+ <h2 class="subtitle subtitle-methods">Class Methods</h2>
+
+ <div class="section-method">
+ <a name="//api/name/filterWithBlock:" title="filterWithBlock:"></a>
+ <h3 class="subsubtitle method-title">filterWithBlock:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Returns a GRMustacheFilter object that executes the provided block when
+tranforming a value.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>+ (id)filterWithBlock:(id ( ^ ) ( id value ))<em>block</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>block</em></dt>
+ <dd><p>The block that transforms its input.</p></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>a GRMustacheFilter object.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v4.3</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheFilter.h</code><br />
+ </div>
+
+
+</div>
+
+ </div>
+
+
+
+
+ </div>
+ <div class="main-navigation navigation-bottom">
+ <ul>
+ <li><a href="../index.html">Index</a></li>
+ <li><a href="../hierarchy.html">Hierarchy</a></li>
+</ul>
+ </div>
+ <div id="footer">
+ <hr />
+ <div class="footer-copyright">
+ <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-08-04)</span><br />
+
+ <span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
+
+ </div>
+ </div>
+ </div>
+ </article>
+ <script type="text/javascript">
+ function jumpToChange()
+ {
+ window.location.hash = this.options[this.selectedIndex].value;
+ }
+
+ function toggleTOC()
+ {
+ var contents = document.getElementById('contents');
+ var tocContainer = document.getElementById('tocContainer');
+
+ if (this.getAttribute('class') == 'open')
+ {
+ this.setAttribute('class', '');
+ contents.setAttribute('class', '');
+ tocContainer.setAttribute('class', '');
+
+ window.name = "hideTOC";
+ }
+ else
+ {
+ this.setAttribute('class', 'open');
+ contents.setAttribute('class', 'isShowingTOC');
+ tocContainer.setAttribute('class', 'isShowingTOC');
+
+ window.name = "";
+ }
+ return false;
+ }
+
+ function toggleTOCEntryChildren(e)
+ {
+ e.stopPropagation();
+ var currentClass = this.getAttribute('class');
+ if (currentClass == 'children') {
+ this.setAttribute('class', 'children open');
+ }
+ else if (currentClass == 'children open') {
+ this.setAttribute('class', 'children');
+ }
+ return false;
+ }
+
+ function tocEntryClick(e)
+ {
+ e.stopPropagation();
+ return true;
+ }
+
+ function init()
+ {
+ var selectElement = document.getElementById('jumpTo');
+ selectElement.addEventListener('change', jumpToChange, false);
+
+ var tocButton = document.getElementById('table_of_contents');
+ tocButton.addEventListener('click', toggleTOC, false);
+
+ var taskTreeItem = document.getElementById('task_treeitem');
+ if (taskTreeItem.getElementsByTagName('li').length > 0)
+ {
+ taskTreeItem.setAttribute('class', 'children');
+ taskTreeItem.firstChild.setAttribute('class', 'disclosure');
+ }
+
+ var tocList = document.getElementById('toc');
+
+ var tocEntries = tocList.getElementsByTagName('li');
+ for (var i = 0; i < tocEntries.length; i++) {
+ tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
+ }
+
+ var tocLinks = tocList.getElementsByTagName('a');
+ for (var i = 0; i < tocLinks.length; i++) {
+ tocLinks[i].addEventListener('click', tocEntryClick, false);
+ }
+
+ if (window.name == "hideTOC") {
+ toggleTOC.call(tocButton);
+ }
+ }
+
+ window.onload = init;
+
+ // If showing in Xcode, hide the TOC and Header
+ if (navigator.userAgent.match(/xcode/i)) {
+ document.getElementById("contents").className = "hideInXcode"
+ document.getElementById("tocContainer").className = "hideInXcode"
+ document.getElementById("top_header").className = "hideInXcode"
+ }
+
+ </script>
+ </body>
+</html>
View
10 Reference/html/Classes/GRMustacheHelper.html
@@ -62,8 +62,6 @@ <h1 class="hideInXcode">GRMustacheHelper Class Reference</h1>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Creating helper objects">Creating helper objects</a></span></li>
-
</ul></li>
@@ -121,7 +119,7 @@ <h2 class="subtitle subtitle-overview">Overview</h2>
<p>The GRMustacheHelper class helps building mustache helpers without writing a
custom class that conforms to the GRMustacheHelper protocol.</p>
-<p><strong>Companion guide:</strong> <a href="https://github.com/groue/GRMustache/blob/master/Guides/runtime/helpers.md">https://github.com/groue/GRMustache/blob/master/Guides/runtime/helpers.md</a></p>
+<p><strong>Companion guide:</strong> <a href="https://github.com/groue/GRMustache/blob/master/Guides/helpers.md">https://github.com/groue/GRMustache/blob/master/Guides/helpers.md</a></p>
</div>
@@ -133,9 +131,9 @@ <h2 class="subtitle subtitle-overview">Overview</h2>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
- <a title="Creating helper objects" name="task_Creating helper objects"></a>
-<h3 class="subsubtitle task-title">Creating helper objects</h3>
+
+
<ul class="task-list">
<li>
<span class="tooltip">
@@ -232,7 +230,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
- <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-07-01)</span><br />
+ <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-08-04)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
View
2 Reference/html/Classes/GRMustacheInvocation.html
@@ -309,7 +309,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
- <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-07-01)</span><br />
+ <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-08-04)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
View
99 Reference/html/Classes/GRMustacheSection.html
@@ -53,6 +53,8 @@ <h1 class="hideInXcode">GRMustacheSection Class Reference</h1>
<option value="//api/name/render">&nbsp;&nbsp;&nbsp;&nbsp;- render</option>
+ <option value="//api/name/renderTemplateString:error:">&nbsp;&nbsp;&nbsp;&nbsp;- renderTemplateString:error:</option>
+
</select>
@@ -75,6 +77,8 @@ <h1 class="hideInXcode">GRMustacheSection Class Reference</h1>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Rendering the inner content">Rendering the inner content</a></span></li>
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Rendering another template string">Rendering another template string</a></span></li>
+
</ul></li>
@@ -97,6 +101,8 @@ <h1 class="hideInXcode">GRMustacheSection Class Reference</h1>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/render">render</a></span></li>
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderTemplateString:error:">renderTemplateString:error:</a></span></li>
+
</ul></li>
@@ -141,7 +147,7 @@ <h2 class="subtitle subtitle-overview">Overview</h2>
mustache lambda sections with objects conforming to the <a href="../Classes/GRMustacheHelper.html">GRMustacheHelper</a>
protocol.</p>
-<p><strong>Companion guide:</strong> <a href="https://github.com/groue/GRMustache/blob/master/Guides/runtime/helpers.md">https://github.com/groue/GRMustache/blob/master/Guides/runtime/helpers.md</a></p>
+<p><strong>Companion guide:</strong> <a href="https://github.com/groue/GRMustache/blob/master/Guides/helpers.md">https://github.com/groue/GRMustache/blob/master/Guides/helpers.md</a></p>
</div>
@@ -191,7 +197,22 @@ <h3 class="subsubtitle task-title">Rendering the inner content</h3>
<li>
<span class="tooltip">
<code><a href="#//api/name/render">&ndash;&nbsp;render</a></code>
- <span class="tooltip"><p>Renders the inner content of the receiver with the current context</p></span>
+ <span class="tooltip"><p>Renders the inner content of the receiver with the current rendering context.</p></span>
+ </span>
+
+
+</li>
+ </ul>
+
+
+ <a title="Rendering another template string" name="task_Rendering another template string"></a>
+ <h3 class="subsubtitle task-title">Rendering another template string</h3>
+
+ <ul class="task-list">
+ <li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderTemplateString:error:">&ndash;&nbsp;renderTemplateString:error:</a></code>
+ <span class="tooltip"><p>Renders a template string with the current rendering context.</p></span>
</span>
@@ -262,7 +283,7 @@ <h3 class="subsubtitle method-title">renderingContext</h3>
- <div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) id renderingContext</code></div>
+ <div class="method-subsection method-declaration"><code>@property (nonatomic, retain, readonly) id renderingContext</code></div>
@@ -272,7 +293,8 @@ <h3 class="subsubtitle method-title">renderingContext</h3>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v2.0</p>
+ <p>v2.0
+@deprecated v4.3</p>
</div>
@@ -308,7 +330,7 @@ <h3 class="subsubtitle method-title">render</h3>
<div class="method-subsection brief-description">
- <p>Renders the inner content of the receiver with the current context</p>
+ <p>Renders the inner content of the receiver with the current rendering context.</p>
</div>
@@ -347,6 +369,71 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
+ <div class="section-method">
+ <a name="//api/name/renderTemplateString:error:" title="renderTemplateString:error:"></a>
+ <h3 class="subsubtitle method-title">renderTemplateString:error:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Renders a template string with the current rendering context.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>- (NSString *)renderTemplateString:(NSString *)<em>string</em> error:(NSError **)<em>outError</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>string</em></dt>
+ <dd><p>A template string</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>outError</em></dt>
+ <dd><p>If there is an error loading or parsing template and</p>
+
+<pre><code> partials, upon return contains an NSError object that
+ describes the problem.
+</code></pre></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A string containing the rendering of the template string.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v4.3</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheSection.h</code><br />
+ </div>
+
+
+</div>
+
</div>
@@ -360,7 +447,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
- <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-07-01)</span><br />
+ <p><span class="copyright">&copy; 2012 Gwendal Roué. All rights reserved. (Last updated: 2012-08-04)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
View
917 Reference/html/Classes/GRMustacheTemplate.html
@@ -57,6 +57,16 @@ <h1 class="hideInXcode">GRMustacheTemplate Class Reference</h1>
<option value="//api/name/renderObject:fromString:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ renderObject:fromString:error:</option>
+ <option value="//api/name/renderObject:withFilters:fromContentsOfFile:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ renderObject:withFilters:fromContentsOfFile:error:</option>
+
+ <option value="//api/name/renderObject:withFilters:fromContentsOfURL:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ renderObject:withFilters:fromContentsOfURL:error:</option>
+
+ <option value="//api/name/renderObject:withFilters:fromResource:bundle:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ renderObject:withFilters:fromResource:bundle:error:</option>
+
+ <option value="//api/name/renderObject:withFilters:fromResource:withExtension:bundle:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ renderObject:withFilters:fromResource:withExtension:bundle:error:</option>
+
+ <option value="//api/name/renderObject:withFilters:fromString:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ renderObject:withFilters:fromString:error:</option>
+
<option value="//api/name/templateFromContentsOfFile:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ templateFromContentsOfFile:error:</option>
<option value="//api/name/templateFromContentsOfURL:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ templateFromContentsOfURL:error:</option>
@@ -76,8 +86,14 @@ <h1 class="hideInXcode">GRMustacheTemplate Class Reference</h1>
<option value="//api/name/renderObject:">&nbsp;&nbsp;&nbsp;&nbsp;- renderObject:</option>
+ <option value="//api/name/renderObject:withFilters:">&nbsp;&nbsp;&nbsp;&nbsp;- renderObject:withFilters:</option>
+
<option value="//api/name/renderObjects:">&nbsp;&nbsp;&nbsp;&nbsp;- renderObjects:</option>
+ <option value="//api/name/renderObjectsInArray:">&nbsp;&nbsp;&nbsp;&nbsp;- renderObjectsInArray:</option>
+
+ <option value="//api/name/renderObjectsInArray:withFilters:">&nbsp;&nbsp;&nbsp;&nbsp;- renderObjectsInArray:withFilters:</option>
+
</select>
@@ -130,6 +146,16 @@ <h1 class="hideInXcode">GRMustacheTemplate Class Reference</h1>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:fromString:error:">renderObject:fromString:error:</a></span></li>
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:withFilters:fromContentsOfFile:error:">renderObject:withFilters:fromContentsOfFile:error:</a></span></li>
+
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:withFilters:fromContentsOfURL:error:">renderObject:withFilters:fromContentsOfURL:error:</a></span></li>
+
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:withFilters:fromResource:bundle:error:">renderObject:withFilters:fromResource:bundle:error:</a></span></li>
+
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:withFilters:fromResource:withExtension:bundle:error:">renderObject:withFilters:fromResource:withExtension:bundle:error:</a></span></li>
+
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:withFilters:fromString:error:">renderObject:withFilters:fromString:error:</a></span></li>
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/templateFromContentsOfFile:error:">templateFromContentsOfFile:error:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/templateFromContentsOfURL:error:">templateFromContentsOfURL:error:</a></span></li>
@@ -150,8 +176,14 @@ <h1 class="hideInXcode">GRMustacheTemplate Class Reference</h1>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:">renderObject:</a></span></li>
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObject:withFilters:">renderObject:withFilters:</a></span></li>
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObjects:">renderObjects:</a></span></li>
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObjectsInArray:">renderObjectsInArray:</a></span></li>
+
+ <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/renderObjectsInArray:withFilters:">renderObjectsInArray:withFilters:</a></span></li>
+
</ul></li>
@@ -233,7 +265,14 @@ <h3 class="subsubtitle task-title">Parsing and Rendering Template Strings</h3>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/renderObject:fromString:error:">+&nbsp;renderObject:fromString:error:</a></code>
- <span class="tooltip"><p>Renders a context object from a template string.</p></span>
+ <span class="tooltip"><p>Renders an object from a template string.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObject:withFilters:fromString:error:">+&nbsp;renderObject:withFilters:fromString:error:</a></code>
+ <span class="tooltip"><p>Renders an object from a template string.</p></span>
</span>
@@ -262,14 +301,28 @@ <h3 class="subsubtitle task-title">Parsing and Rendering Files</h3>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/renderObject:fromContentsOfFile:error:">+&nbsp;renderObject:fromContentsOfFile:error:</a></code>
- <span class="tooltip"><p>Renders a context object from a file template.</p></span>
+ <span class="tooltip"><p>Renders an object from a file template.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObject:withFilters:fromContentsOfFile:error:">+&nbsp;renderObject:withFilters:fromContentsOfFile:error:</a></code>
+ <span class="tooltip"><p>Renders an object from a file template.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/renderObject:fromContentsOfURL:error:">+&nbsp;renderObject:fromContentsOfURL:error:</a></code>
- <span class="tooltip"><p>Renders a context object from a file template.</p></span>
+ <span class="tooltip"><p>Renders an object from a file template.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObject:withFilters:fromContentsOfURL:error:">+&nbsp;renderObject:withFilters:fromContentsOfURL:error:</a></code>
+ <span class="tooltip"><p>Renders an object from a file template.</p></span>
</span>
@@ -298,14 +351,28 @@ <h3 class="subsubtitle task-title">Parsing and Rendering NSBundle Resources</h3>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/renderObject:fromResource:bundle:error:">+&nbsp;renderObject:fromResource:bundle:error:</a></code>
- <span class="tooltip"><p>Renders a context object from a bundle resource template.</p></span>
+ <span class="tooltip"><p>Renders an object from a bundle resource template.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObject:withFilters:fromResource:bundle:error:">+&nbsp;renderObject:withFilters:fromResource:bundle:error:</a></code>
+ <span class="tooltip"><p>Renders an object from a bundle resource template.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/renderObject:fromResource:withExtension:bundle:error:">+&nbsp;renderObject:fromResource:withExtension:bundle:error:</a></code>
- <span class="tooltip"><p>Renders a context object from a bundle resource template.</p></span>
+ <span class="tooltip"><p>Renders an object from a bundle resource template.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObject:withFilters:fromResource:withExtension:bundle:error:">+&nbsp;renderObject:withFilters:fromResource:withExtension:bundle:error:</a></code>
+ <span class="tooltip"><p>Renders an object from a bundle resource template.</p></span>
</span>
@@ -326,6 +393,27 @@ <h3 class="subsubtitle task-title">Rendering a Parsed Template</h3>
</li><li>
<span class="tooltip">
+ <code><a href="#//api/name/renderObject:withFilters:">&ndash;&nbsp;renderObject:withFilters:</a></code>
+ <span class="tooltip"><p>Renders a template with a context stack initialized with a single object.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObjectsInArray:">&ndash;&nbsp;renderObjectsInArray:</a></code>
+ <span class="tooltip"><p>Renders a template with a context stack initialized with an array of objects.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
+ <code><a href="#//api/name/renderObjectsInArray:withFilters:">&ndash;&nbsp;renderObjectsInArray:withFilters:</a></code>
+ <span class="tooltip"><p>Renders a template with a context stack initialized with an array of objects.</p></span>
+ </span>
+
+
+</li><li>
+ <span class="tooltip">
<code><a href="#//api/name/renderObjects:">&ndash;&nbsp;renderObjects:</a></code>
<span class="tooltip"><p>Renders a template with a context stack initialized with several objects.</p></span>
</span>
@@ -421,7 +509,7 @@ <h3 class="subsubtitle method-title">renderObject:fromContentsOfFile:error:</h3>
<div class="method-subsection brief-description">
- <p>Renders a context object from a file template.</p>
+ <p>Renders an object from a file template.</p>
</div>
@@ -435,12 +523,12 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>object</em></dt>
- <dd><p>A context object used for interpreting Mustache tags</p></dd>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>path</em></dt>
- <dd><p>The path of the template</p></dd>
+ <dd><p>The path of the template.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -458,7 +546,7 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A string containing the rendered template.</p>
</div>
@@ -506,7 +594,7 @@ <h3 class="subsubtitle method-title">renderObject:fromContentsOfURL:error:</h3>
<div class="method-subsection brief-description">
- <p>Renders a context object from a file template.</p>
+ <p>Renders an object from a file template.</p>
</div>
@@ -520,12 +608,12 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>object</em></dt>
- <dd><p>A context object used for interpreting Mustache tags</p></dd>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
- <dd><p>The URL of the template</p></dd>
+ <dd><p>The URL of the template.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -543,7 +631,7 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A string containing the rendered template.</p>
</div>
@@ -591,7 +679,7 @@ <h3 class="subsubtitle method-title">renderObject:fromResource:bundle:error:</h3
<div class="method-subsection brief-description">
- <p>Renders a context object from a bundle resource template.</p>
+ <p>Renders an object from a bundle resource template.</p>
</div>
@@ -605,17 +693,17 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>object</em></dt>
- <dd><p>A context object used for interpreting Mustache tags</p></dd>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>name</em></dt>
- <dd><p>The name of a bundle resource of extension &ldquo;mustache&rdquo;</p></dd>
+ <dd><p>The name of a bundle resource of extension &ldquo;mustache&rdquo;.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>bundle</em></dt>
- <dd><p>The bundle where to look for the template resource</p></dd>
+ <dd><p>The bundle where to look for the template resource.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -633,7 +721,7 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A string containing the rendered template.</p>
</div>
@@ -684,7 +772,7 @@ <h3 class="subsubtitle method-title">renderObject:fromResource:withExtension:bun
<div class="method-subsection brief-description">
- <p>Renders a context object from a bundle resource template.</p>
+ <p>Renders an object from a bundle resource template.</p>
</div>
@@ -698,17 +786,17 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>object</em></dt>
- <dd><p>A context object used for interpreting Mustache tags</p></dd>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>name</em></dt>
- <dd><p>The name of a bundle resource</p></dd>
+ <dd><p>The name of a bundle resource.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>ext</em></dt>
- <dd><p>The extension of the bundle resource</p></dd>
+ <dd><p>The extension of the bundle resource.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -731,7 +819,7 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A string containing the rendered template.</p>
</div>
@@ -782,7 +870,7 @@ <h3 class="subsubtitle method-title">renderObject:fromString:error:</h3>
<div class="method-subsection brief-description">
- <p>Renders a context object from a template string.</p>
+ <p>Renders an object from a template string.</p>
</div>
@@ -796,12 +884,12 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>object</em></dt>
- <dd><p>A context object used for interpreting Mustache tags</p></dd>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>templateString</em></dt>
- <dd><p>The template string</p></dd>
+ <dd><p>The template string.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -819,7 +907,7 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A string containing the rendered template.</p>
</div>
@@ -846,27 +934,37 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/templateFromContentsOfFile:error:" title="templateFromContentsOfFile:error:"></a>
- <h3 class="subsubtitle method-title">templateFromContentsOfFile:error:</h3>
+ <a name="//api/name/renderObject:withFilters:fromContentsOfFile:error:" title="renderObject:withFilters:fromContentsOfFile:error:"></a>
+ <h3 class="subsubtitle method-title">renderObject:withFilters:fromContentsOfFile:error:</h3>
<div class="method-subsection brief-description">
- <p>Parses a template file, and returns a compiled template.</p>
+ <p>Renders an object from a file template.</p>
</div>
- <div class="method-subsection method-declaration"><code>+ (id)templateFromContentsOfFile:(NSString *)<em>path</em> error:(NSError **)<em>outError</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (NSString *)renderObject:(id)<em>object</em> withFilters:(id)<em>filters</em> fromContentsOfFile:(NSString *)<em>path</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>filters</em></dt>
+ <dd><p>An object that provides custom filters.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
<dt><em>path</em></dt>
- <dd><p>The path of the template</p></dd>
+ <dd><p>The path of the template.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -884,14 +982,14 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A GRMustacheTemplate instance</p>
+ <p>A string containing the rendered template.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.11</p>
+ <p>v4.3</p>
</div>
@@ -926,27 +1024,37 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/templateFromContentsOfURL:error:" title="templateFromContentsOfURL:error:"></a>
- <h3 class="subsubtitle method-title">templateFromContentsOfURL:error:</h3>
+ <a name="//api/name/renderObject:withFilters:fromContentsOfURL:error:" title="renderObject:withFilters:fromContentsOfURL:error:"></a>
+ <h3 class="subsubtitle method-title">renderObject:withFilters:fromContentsOfURL:error:</h3>
<div class="method-subsection brief-description">
- <p>Parses a template file, and returns a compiled template.</p>
+ <p>Renders an object from a file template.</p>
</div>
- <div class="method-subsection method-declaration"><code>+ (id)templateFromContentsOfURL:(NSURL *)<em>url</em> error:(NSError **)<em>outError</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (NSString *)renderObject:(id)<em>object</em> withFilters:(id)<em>filters</em> fromContentsOfURL:(NSURL *)<em>url</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>filters</em></dt>
+ <dd><p>An object that provides custom filters.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
<dt><em>url</em></dt>
- <dd><p>The URL of the template</p></dd>
+ <dd><p>The URL of the template.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -964,14 +1072,14 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A GRMustacheTemplate instance</p>
+ <p>A string containing the rendered template.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.11</p>
+ <p>v4.3</p>
</div>
@@ -1006,27 +1114,37 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/templateFromResource:bundle:error:" title="templateFromResource:bundle:error:"></a>
- <h3 class="subsubtitle method-title">templateFromResource:bundle:error:</h3>
+ <a name="//api/name/renderObject:withFilters:fromResource:bundle:error:" title="renderObject:withFilters:fromResource:bundle:error:"></a>
+ <h3 class="subsubtitle method-title">renderObject:withFilters:fromResource:bundle:error:</h3>
<div class="method-subsection brief-description">
- <p>Parses a bundle resource template, and returns a compiled template.</p>
+ <p>Renders an object from a bundle resource template.</p>
</div>
- <div class="method-subsection method-declaration"><code>+ (id)templateFromResource:(NSString *)<em>name</em> bundle:(NSBundle *)<em>bundle</em> error:(NSError **)<em>outError</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (NSString *)renderObject:(id)<em>object</em> withFilters:(id)<em>filters</em> fromResource:(NSString *)<em>name</em> bundle:(NSBundle *)<em>bundle</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>filters</em></dt>
+ <dd><p>An object that provides custom filters.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
<dt><em>name</em></dt>
- <dd><p>The name of a bundle resource of extension &ldquo;mustache&rdquo;</p></dd>
+ <dd><p>The name of a bundle resource of extension &ldquo;mustache&rdquo;.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -1049,14 +1167,14 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A GRMustacheTemplate instance</p>
+ <p>A string containing the rendered template.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.11</p>
+ <p>v4.3</p>
</div>
@@ -1094,37 +1212,47 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/templateFromResource:withExtension:bundle:error:" title="templateFromResource:withExtension:bundle:error:"></a>
- <h3 class="subsubtitle method-title">templateFromResource:withExtension:bundle:error:</h3>
+ <a name="//api/name/renderObject:withFilters:fromResource:withExtension:bundle:error:" title="renderObject:withFilters:fromResource:withExtension:bundle:error:"></a>
+ <h3 class="subsubtitle method-title">renderObject:withFilters:fromResource:withExtension:bundle:error:</h3>
<div class="method-subsection brief-description">
- <p>Parses a bundle resource template, and returns a compiled template.</p>
+ <p>Renders an object from a bundle resource template.</p>
</div>
- <div class="method-subsection method-declaration"><code>+ (id)templateFromResource:(NSString *)<em>name</em> withExtension:(NSString *)<em>ext</em> bundle:(NSBundle *)<em>bundle</em> error:(NSError **)<em>outError</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (NSString *)renderObject:(id)<em>object</em> withFilters:(id)<em>filters</em> fromResource:(NSString *)<em>name</em> withExtension:(NSString *)<em>ext</em> bundle:(NSBundle *)<em>bundle</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>filters</em></dt>
+ <dd><p>An object that provides custom filters.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
<dt><em>name</em></dt>
- <dd><p>The name of a bundle resource</p></dd>
+ <dd><p>The name of a bundle resource.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>ext</em></dt>
- <dd><p>The extension of the bundle resource</p></dd>
+ <dd><p>The extension of the bundle resource.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>bundle</em></dt>
- <dd><p>The bundle where to look for the template resource</p></dd>
+ <dd><p>The bundle where to look for the template resource.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -1142,14 +1270,14 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A GRMustacheTemplate instance</p>
+ <p>A string containing the rendered template.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.11</p>
+ <p>v4.3</p>
</div>
@@ -1187,27 +1315,37 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/templateFromString:error:" title="templateFromString:error:"></a>
- <h3 class="subsubtitle method-title">templateFromString:error:</h3>
+ <a name="//api/name/renderObject:withFilters:fromString:error:" title="renderObject:withFilters:fromString:error:"></a>
+ <h3 class="subsubtitle method-title">renderObject:withFilters:fromString:error:</h3>
<div class="method-subsection brief-description">
- <p>Parses a template string, and returns a compiled template.</p>
+ <p>Renders an object from a template string.</p>
</div>
- <div class="method-subsection method-declaration"><code>+ (id)templateFromString:(NSString *)<em>templateString</em> error:(NSError **)<em>outError</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (NSString *)renderObject:(id)<em>object</em> withFilters:(id)<em>filters</em> fromString:(NSString *)<em>templateString</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>filters</em></dt>
+ <dd><p>An object that provides custom filters.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
<dt><em>templateString</em></dt>
- <dd><p>The template string</p></dd>
+ <dd><p>The template string.</p></dd>
</dl>
<dl class="argument-def parameter-def">
@@ -1225,14 +1363,14 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A GRMustacheTemplate instance</p>
+ <p>A string containing the rendered template.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.11</p>
+ <p>v4.3</p>
</div>
@@ -1251,49 +1389,75 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
- </div>
-
-
-
- <div class="section section-methods">
- <a title="Instance Methods" name="instance_methods"></a>
- <h2 class="subtitle subtitle-methods">Instance Methods</h2>
-
<div class="section-method">
- <a name="//api/name/render" title="render"></a>
- <h3 class="subsubtitle method-title">render</h3>
+ <a name="//api/name/templateFromContentsOfFile:error:" title="templateFromContentsOfFile:error:"></a>
+ <h3 class="subsubtitle method-title">templateFromContentsOfFile:error:</h3>
<div class="method-subsection brief-description">
- <p>Renders a template without any context object for interpreting Mustache tags.</p>
+ <p>Parses a template file, and returns a compiled template.</p>
</div>
- <div class="method-subsection method-declaration"><code>- (NSString *)render</code></div>
+ <div class="method-subsection method-declaration"><code>+ (id)templateFromContentsOfFile:(NSString *)<em>path</em> error:(NSError **)<em>outError</em></code></div>
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>path</em></dt>
+ <dd><p>The path of the template.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>outError</em></dt>
+ <dd><p>If there is an error loading or parsing template and</p>
+
+<pre><code> partials, upon return contains an NSError object that
+ describes the problem.
+</code></pre></dd>
+ </dl>
+
+ </div>
+
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A GRMustacheTemplate instance.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.0</p>
+ <p>v1.11</p>
</div>
+ <div class="method-subsection discussion-section">
+ <h4 class="method-subtitle">Discussion</h4>
+ <p>The template at path must be encoded in UTF8. See the
+<a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a> class for more encoding options.</p>
+ </div>
+
+
+ <div class="method-subsection see-also-section">
+ <h4 class="method-subtitle">See Also</h4>
+ <ul>
+
+ <li><code><p><a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a></p></code></li>
+
+ </ul>
+ </div>
@@ -1306,27 +1470,36 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/renderObject:" title="renderObject:"></a>
- <h3 class="subsubtitle method-title">renderObject:</h3>
+ <a name="//api/name/templateFromContentsOfURL:error:" title="templateFromContentsOfURL:error:"></a>
+ <h3 class="subsubtitle method-title">templateFromContentsOfURL:error:</h3>
<div class="method-subsection brief-description">
- <p>Renders a template with a context stack initialized with a single object.</p>
+ <p>Parses a template file, and returns a compiled template.</p>
</div>
- <div class="method-subsection method-declaration"><code>- (NSString *)renderObject:(id)<em>object</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (id)templateFromContentsOfURL:(NSURL *)<em>url</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
- <dt><em>object</em></dt>
- <dd><p>A context object used for interpreting Mustache tags</p></dd>
+ <dt><em>url</em></dt>
+ <dd><p>The URL of the template.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>outError</em></dt>
+ <dd><p>If there is an error loading or parsing template and</p>
+
+<pre><code> partials, upon return contains an NSError object that
+ describes the problem.
+</code></pre></dd>
</dl>
</div>
@@ -1335,21 +1508,36 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
- <p>A string containing the rendered template</p>
+ <p>A GRMustacheTemplate instance.</p>
</div>
<div class="method-subsection availability">
<h4 class="method-subtitle parameter-title">Availability</h4>
- <p>v1.0</p>
+ <p>v1.11</p>
</div>
+ <div class="method-subsection discussion-section">
+ <h4 class="method-subtitle">Discussion</h4>
+ <p>The template at url must be encoded in UTF8. See the
+<a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a> class for more encoding options.</p>
+ </div>
+
+
+ <div class="method-subsection see-also-section">
+ <h4 class="method-subtitle">See Also</h4>
+ <ul>
+
+ <li><code><p><a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a></p></code></li>
+
+ </ul>
+ </div>
@@ -1362,32 +1550,567 @@ <h4 class="method-subtitle">Declared In</h4>
</div>
<div class="section-method">
- <a name="//api/name/renderObjects:" title="renderObjects:"></a>
- <h3 class="subsubtitle method-title">renderObjects:</h3>
+ <a name="//api/name/templateFromResource:bundle:error:" title="templateFromResource:bundle:error:"></a>
+ <h3 class="subsubtitle method-title">templateFromResource:bundle:error:</h3>
<div class="method-subsection brief-description">
- <p>Renders a template with a context stack initialized with several objects.</p>
+ <p>Parses a bundle resource template, and returns a compiled template.</p>
</div>
- <div class="method-subsection method-declaration"><code>- (NSString *)renderObjects:(id)<em>object</em>, <em>...</em></code></div>
+ <div class="method-subsection method-declaration"><code>+ (id)templateFromResource:(NSString *)<em>name</em> bundle:(NSBundle *)<em>bundle</em> error:(NSError **)<em>outError</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
- <dt><em>object</em></dt>
- <dd><p>The bottom object in the context stack.</p></dd>
+ <dt><em>name</em></dt>
+ <dd><p>The name of a bundle resource of extension &ldquo;mustache&rdquo;.</p></dd>
</dl>
<dl class="argument-def parameter-def">
- <dt><em>...</em></dt>
- <dd><p>The other objects in the context stack.</p></dd>
+ <dt><em>bundle</em></dt>
+ <dd><p>The bundle where to look for the template resource.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>outError</em></dt>
+ <dd><p>If there is an error loading or parsing template and</p>
+
+<pre><code> partials, upon return contains an NSError object that
+ describes the problem.
+</code></pre></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A GRMustacheTemplate instance.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v1.11</p>
+ </div>
+
+
+
+ <div class="method-subsection discussion-section">
+ <h4 class="method-subtitle">Discussion</h4>
+ <p>If you provide nil as a bundle, the resource will be looked in the main
+bundle.</p>
+
+<p>The template resource must be encoded in UTF8. See the
+<a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a> class for more encoding options.</p>
+ </div>
+
+
+
+
+
+ <div class="method-subsection see-also-section">
+ <h4 class="method-subtitle">See Also</h4>
+ <ul>
+
+ <li><code><p><a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a></p></code></li>
+
+ </ul>
+ </div>
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ <div class="section-method">
+ <a name="//api/name/templateFromResource:withExtension:bundle:error:" title="templateFromResource:withExtension:bundle:error:"></a>
+ <h3 class="subsubtitle method-title">templateFromResource:withExtension:bundle:error:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Parses a bundle resource template, and returns a compiled template.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>+ (id)templateFromResource:(NSString *)<em>name</em> withExtension:(NSString *)<em>ext</em> bundle:(NSBundle *)<em>bundle</em> error:(NSError **)<em>outError</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>name</em></dt>
+ <dd><p>The name of a bundle resource.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>ext</em></dt>
+ <dd><p>The extension of the bundle resource.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>bundle</em></dt>
+ <dd><p>The bundle where to look for the template resource.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>outError</em></dt>
+ <dd><p>If there is an error loading or parsing template and</p>
+
+<pre><code> partials, upon return contains an NSError object that
+ describes the problem.
+</code></pre></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A GRMustacheTemplate instance.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v1.11</p>
+ </div>
+
+
+
+ <div class="method-subsection discussion-section">
+ <h4 class="method-subtitle">Discussion</h4>
+ <p>If you provide nil as a bundle, the resource will be looked in the main
+bundle.</p>
+
+<p>The template resource must be encoded in UTF8. See the
+<a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a> class for more encoding options.</p>
+ </div>
+
+
+
+
+
+ <div class="method-subsection see-also-section">
+ <h4 class="method-subtitle">See Also</h4>
+ <ul>
+
+ <li><code><p><a href="../Classes/GRMustacheTemplateRepository.html">GRMustacheTemplateRepository</a></p></code></li>
+
+ </ul>
+ </div>
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ <div class="section-method">
+ <a name="//api/name/templateFromString:error:" title="templateFromString:error:"></a>
+ <h3 class="subsubtitle method-title">templateFromString:error:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Parses a template string, and returns a compiled template.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>+ (id)templateFromString:(NSString *)<em>templateString</em> error:(NSError **)<em>outError</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>templateString</em></dt>
+ <dd><p>The template string.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>outError</em></dt>
+ <dd><p>If there is an error loading or parsing template and</p>
+
+<pre><code> partials, upon return contains an NSError object that
+ describes the problem.
+</code></pre></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A GRMustacheTemplate instance.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v1.11</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ </div>
+
+
+
+ <div class="section section-methods">
+ <a title="Instance Methods" name="instance_methods"></a>
+ <h2 class="subtitle subtitle-methods">Instance Methods</h2>
+
+ <div class="section-method">
+ <a name="//api/name/render" title="render"></a>
+ <h3 class="subsubtitle method-title">render</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Renders a template without any context object for interpreting Mustache tags.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>- (NSString *)render</code></div>
+
+
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A string containing the rendered template.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v1.0</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ <div class="section-method">
+ <a name="//api/name/renderObject:" title="renderObject:"></a>
+ <h3 class="subsubtitle method-title">renderObject:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Renders a template with a context stack initialized with a single object.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>- (NSString *)renderObject:(id)<em>object</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A string containing the rendered template.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v1.0</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ <div class="section-method">
+ <a name="//api/name/renderObject:withFilters:" title="renderObject:withFilters:"></a>
+ <h3 class="subsubtitle method-title">renderObject:withFilters:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Renders a template with a context stack initialized with a single object.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>- (NSString *)renderObject:(id)<em>object</em> withFilters:(id)<em>filters</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>An object used for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>filters</em></dt>
+ <dd><p>An object that provides custom filters.</p></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A string containing the rendered template.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v4.3</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ <div class="section-method">
+ <a name="//api/name/renderObjects:" title="renderObjects:"></a>
+ <h3 class="subsubtitle method-title">renderObjects:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Renders a template with a context stack initialized with several objects.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>- (NSString *)renderObjects:(id)<em>object</em>, <em>...</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>object</em></dt>
+ <dd><p>The bottom object in the context stack.</p></dd>
+ </dl>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>...</em></dt>
+ <dd><p>The other objects in the context stack.</p></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">
+ <h4 class="method-subtitle parameter-title">Return Value</h4>
+ <p>A string containing the rendered template.</p>
+ </div>
+
+
+
+ <div class="method-subsection availability">
+ <h4 class="method-subtitle parameter-title">Availability</h4>
+ <p>v1.5
+@deprecated v4.3</p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="method-subsection declared-in-section">
+ <h4 class="method-subtitle">Declared In</h4>
+ <code class="declared-in-ref">GRMustacheTemplate.h</code><br />
+ </div>
+
+
+</div>
+
+ <div class="section-method">
+ <a name="//api/name/renderObjectsInArray:" title="renderObjectsInArray:"></a>
+ <h3 class="subsubtitle method-title">renderObjectsInArray:</h3>
+
+
+
+ <div class="method-subsection brief-description">
+ <p>Renders a template with a context stack initialized with an array of objects.</p>
+ </div>
+
+
+
+ <div class="method-subsection method-declaration"><code>- (NSString *)renderObjectsInArray:(NSArray *)<em>objects</em></code></div>
+
+
+
+ <div class="method-subsection arguments-section parameters">
+ <h4 class="method-subtitle parameter-title">Parameters</h4>
+
+ <dl class="argument-def parameter-def">
+ <dt><em>objects</em></dt>
+ <dd><p>An array of context objects for interpreting Mustache tags.</p></dd>
+ </dl>
+
+ </div>
+
+
+
+ <div class="method-subsection return">