Refactor to create tags with a parse class method instead of new.

By moving parse out of the initializer, we can call super at the start of
the initializers for subclasses, and avoid the nasty allocate hack.
This commit is contained in:
Dylan Thacker-Smith
2014-03-20 16:10:10 -04:00
parent e190bbba9e
commit d4ecaff8b8
18 changed files with 44 additions and 49 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ class StandardTagTest < Test::Unit::TestCase
include Liquid
def test_tag
tag = Tag.new('tag', [], [])
tag = Tag.parse('tag', [], [], {})
assert_equal 'liquid::tag', tag.name
assert_equal '', tag.render(Context.new)
end