Make HBMustacheParent public

This commit is contained in:
Adam Fowler
2021-09-28 15:41:11 +01:00
parent ba7cbfbb09
commit 8b38438f17

View File

@@ -14,12 +14,12 @@
/// Protocol for object that has a custom method for accessing their children, instead /// Protocol for object that has a custom method for accessing their children, instead
/// of using Mirror /// of using Mirror
protocol HBMustacheParent { public protocol HBMustacheParent {
func child(named: String) -> Any? func child(named: String) -> Any?
} }
/// Extend dictionary where the key is a string so that it uses the key values to access /// Extend dictionary where the key is a string so that it uses the key values to access
/// it values /// it values
extension Dictionary: HBMustacheParent where Key == String { extension Dictionary: HBMustacheParent where Key == String {
func child(named: String) -> Any? { return self[named] } public func child(named: String) -> Any? { return self[named] }
} }