From 04eb115da74226117c518c9996be5fcaf02f9d91 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sat, 17 Dec 2011 23:49:25 +0100 Subject: [PATCH] Add identity tag which just returns whatever was entered as input --- lib/chili_project/liquid/tags/identity.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/chili_project/liquid/tags/identity.rb diff --git a/lib/chili_project/liquid/tags/identity.rb b/lib/chili_project/liquid/tags/identity.rb new file mode 100644 index 00000000..07daa447 --- /dev/null +++ b/lib/chili_project/liquid/tags/identity.rb @@ -0,0 +1,14 @@ +module ChiliProject::Liquid::Tags + class Identity < Tag + def initialize(tag_name, markup, tokens) + @tag_name = tag_name + @markup = markup + @tokens = tokens + super + end + + def render(context) + "{% #{@tag_name} %}" + end + end +end \ No newline at end of file