[Template] Set default value for bundle initialiser

This commit is contained in:
Kyle Fuller
2015-10-02 12:20:42 -07:00
parent 8f334563bf
commit 1136ca8fca

View File

@@ -6,13 +6,8 @@ public class Template {
public let parser:TokenParser public let parser:TokenParser
private var nodes:[NodeType]? = nil private var nodes:[NodeType]? = nil
/// Create a template with the given name inside the main bundle
public convenience init(named:String) throws {
try self.init(named:named, inBundle:nil)
}
/// Create a template with the given name inside the given bundle /// Create a template with the given name inside the given bundle
public convenience init(named:String, inBundle bundle:NSBundle?) throws { public convenience init(named:String, inBundle bundle:NSBundle? = nil) throws {
let url:NSURL let url:NSURL
if let bundle = bundle { if let bundle = bundle {