Remove unnessecary uses of Foundation

This commit is contained in:
Kyle Fuller
2015-11-21 14:06:04 +00:00
parent dc774fe43b
commit c86ab9c5b9
5 changed files with 40 additions and 55 deletions

View File

@@ -1,25 +1,26 @@
import Foundation
import PathKit
// A class for loading a template from disk
public class TemplateLoader {
public let paths:[Path]
public let paths: [Path]
public init(paths:[Path]) {
public init(paths: [Path]) {
self.paths = paths
}
public init(bundle:[NSBundle]) {
public init(bundle: [NSBundle]) {
self.paths = bundle.map {
return Path($0.bundlePath)
}
}
public func loadTemplate(templateName:String) -> Template? {
public func loadTemplate(templateName: String) -> Template? {
return loadTemplate([templateName])
}
public func loadTemplate(templateNames:[String]) -> Template? {
public func loadTemplate(templateNames: [String]) -> Template? {
for path in paths {
for templateName in templateNames {
let templatePath = path + Path(templateName)