Skip to content

Instantly share code, notes, and snippets.

@abjurato
Created May 2, 2016 07:01
Show Gist options
  • Save abjurato/4e3bcbbcee2d55b8adeb51528b2e58e9 to your computer and use it in GitHub Desktop.
Save abjurato/4e3bcbbcee2d55b8adeb51528b2e58e9 to your computer and use it in GitHub Desktop.
CatNameHandler for processing CatName mustache template. Swift, Perfect, mustache and PostgreSQL on Heroku.
import PerfectLib
class CatNameHandler: PageHandler {
func valuesForResponse(context: MustacheEvaluationContext, collector: MustacheEvaluationOutputCollector) throws -> MustacheEvaluationContext.MapType {
let dict:MustacheEvaluationContext.MapType = ["name": "Sasha"]
return dict
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment