Make MustacheSequence public (#38)
* Make `MustacheSequence` public * `MustacheSequence` require conformance to `Sequence` * remove protocol requirements * `MustacheContext` revert to `internal`
This commit is contained in:
@@ -13,14 +13,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// Protocol for objects that can be rendered as a sequence in Mustache
|
||||
protocol MustacheSequence {
|
||||
/// Render section using template
|
||||
func renderSection(with template: MustacheTemplate, context: MustacheContext) -> String
|
||||
/// Render inverted section using template
|
||||
func renderInvertedSection(with template: MustacheTemplate, context: MustacheContext) -> String
|
||||
}
|
||||
public protocol MustacheSequence: Sequence {}
|
||||
|
||||
extension Sequence {
|
||||
extension MustacheSequence {
|
||||
/// Render section using template
|
||||
func renderSection(with template: MustacheTemplate, context: MustacheContext) -> String {
|
||||
var string = ""
|
||||
|
||||
Reference in New Issue
Block a user