0001    import Foundation
0002    import PathKit
0003    
0004    
0005    // A class for loading a template from disk
0006    public class TemplateLoader
Include.swift:22
    guard let loader = context["loader"] as? TemplateLoader else {
Inheritence.swift:63
    guard let loader = context["loader"] as? TemplateLoader else {
{ 0007 public let paths: [Path] 0008 0009 public init(paths: [Path]) { 0010 self.paths = paths 0011 } 0012 0013 public init(bundle: [NSBundle]) { 0014 self.paths = bundle.map { 0015 return Path($0.bundlePath) 0016 } 0017 } 0018 0019 public func loadTemplate
Include.swift:30
    guard let template = loader.loadTemplate(templateName) else {
Inheritence.swift:71
    guard let template = loader.loadTemplate(templateName) else {
(templateName: String) -> Template? { 0020 return loadTemplate([templateName]) 0021 } 0022 0023 public func loadTemplate
TemplateLoader.swift:20
    return loadTemplate([templateName])
(templateNames: [String]) -> Template? { 0024 for path in paths { 0025 for templateName in templateNames { 0026 let templatePath = path + Path(templateName) 0027 0028 if templatePath.exists { 0029 if let template = try? Template(path: templatePath) { 0030 return template 0031 } 0032 } 0033 } 0034 } 0035 0036 return nil 0037 } 0038 } 0039