Colocate Traversal classes with classes they traverse

This puts all knowledge of the traversal in the same file, and removes
the need for a CASES registry.
This commit is contained in:
Stephen Paul Weber
2018-10-18 09:37:48 -04:00
parent d789ec4175
commit c11fc656cf
13 changed files with 72 additions and 82 deletions
+6
View File
@@ -138,5 +138,11 @@ module Liquid
raise error
end
end
class Traversal < Liquid::Traversal
def children
[@node.name] + @node.filters.flatten
end
end
end
end