add documentation to include, fixes #163

This commit is contained in:
Peter Schröder
2013-06-05 11:53:01 -04:00
parent 94ff457744
commit e92540a9bf
+15
View File
@@ -1,4 +1,19 @@
module Liquid
# Include allows templates to relate with other templates
#
# Simply include another template:
#
# {% include 'product' %}
#
# Include a template with a local variable:
#
# {% include 'product' with products[0] %}
#
# Include a template for a collection:
#
# {% include 'product' for products %}
#
class Include < Tag
Syntax = /(#{QuotedFragment}+)(\s+(?:with|for)\s+(#{QuotedFragment}+))?/o