chore: Lock down APIs

This commit is contained in:
Kyle Fuller
2016-11-27 02:20:46 +00:00
parent 60b378d482
commit a13401b046
17 changed files with 67 additions and 60 deletions

View File

@@ -1,10 +1,10 @@
import PathKit
open class IncludeNode : NodeType {
open let templateName: Variable
class IncludeNode : NodeType {
let templateName: Variable
open class func parse(_ parser: TokenParser, token: Token) throws -> NodeType {
class func parse(_ parser: TokenParser, token: Token) throws -> NodeType {
let bits = token.components()
guard bits.count == 2 else {
@@ -14,11 +14,11 @@ open class IncludeNode : NodeType {
return IncludeNode(templateName: Variable(bits[1]))
}
public init(templateName: Variable) {
init(templateName: Variable) {
self.templateName = templateName
}
open func render(_ context: Context) throws -> String {
func render(_ context: Context) throws -> String {
guard let loader = context["loader"] as? TemplateLoader else {
throw TemplateSyntaxError("Template loader not in context")
}