Add can method to twig extention

This PR add a simple method "can" to the twig extention.