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

@@ -14,7 +14,7 @@ public class Context {
self.namespace = namespace
}
open subscript(key: String) -> Any? {
public subscript(key: String) -> Any? {
/// Retrieves a variable's value, starting at the current context and going upwards
get {
for dictionary in Array(dictionaries.reversed()) {
@@ -47,7 +47,7 @@ public class Context {
}
/// Push a new level onto the context for the duration of the execution of the given closure
open func push<Result>(dictionary: [String: Any]? = nil, closure: (() throws -> Result)) rethrows -> Result {
public func push<Result>(dictionary: [String: Any]? = nil, closure: (() throws -> Result)) rethrows -> Result {
push(dictionary)
defer { _ = pop() }
return try closure()