HamlJS template should return a function that accepts scope variable