[Readme] Update code example for enum API

This commit is contained in:
Marius Rackwitz
2014-10-26 13:37:41 +00:00
parent 25b86dea93
commit d6a6696c20

View File

@@ -26,11 +26,12 @@ let context = Context(dictionary: [
let template = Template(named: "template.stencil")
let result = template.render(context)
if let error = result.error {
println("There was an error rendering your template (\(error)).")
switch result {
case .Error(let error):
println("There was an error rendering your template (\(error)).")
case .Success(let string):
println("\(string)")
}
println("\(result.string)")
```
## Philosophy