Swift format, swift 5.3

This commit is contained in:
Adam Fowler
2021-03-21 11:56:08 +00:00
parent 3c50d1c15c
commit a08b1e8087
10 changed files with 134 additions and 111 deletions

View File

@@ -7,7 +7,7 @@
public final class HBMustacheLibrary {
/// Initialize empty library
public init() {
templates = [:]
self.templates = [:]
}
/// Initialize library with contents of folder.
@@ -17,7 +17,7 @@ public final class HBMustacheLibrary {
/// - Parameter directory: Directory to look for mustache templates
/// - Parameter extension: Extension of files to look for
public init(directory: String, withExtension extension: String = "mustache") throws {
templates = [:]
self.templates = [:]
try loadTemplates(from: directory, withExtension: `extension`)
}
@@ -27,14 +27,14 @@ public final class HBMustacheLibrary {
/// - name: Name of template
public func register(_ template: HBMustacheTemplate, named name: String) {
template.setLibrary(self)
templates[name] = template
self.templates[name] = template
}
/// Return template registed with name
/// - Parameter name: name to search for
/// - Returns: Template
public func getTemplate(named name: String) -> HBMustacheTemplate? {
templates[name]
self.templates[name]
}
/// Render object using templated with name