refactor: TemplateLoader to protocol, follow Swift API guidelines

This commit is contained in:
Kyle Fuller
2016-11-28 03:50:53 +00:00
parent 5ca1b78854
commit 429290e0b7
9 changed files with 65 additions and 34 deletions

View File

@@ -117,12 +117,12 @@ You can include another template using the `include` tag.
{% include "comment.html" %}
The `include` tag requires a TemplateLoader to be found inside your context with the paths, or bundles used to lookup the template.
The `include` tag requires a FileSystemLoader to be found inside your context with the paths, or bundles used to lookup the template.
.. code-block:: swift
let context = Context(dictionary: [
"loader": TemplateLoader(bundle:[NSBundle.mainBundle()])
"loader": FileSystemLoader(bundle: [NSBundle.mainBundle()])
])
``extends``