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
@@ -78,5 +78,11 @@ module Liquid
def state
[@name, @lookups, @command_flags]
end
class Traversal < Liquid::Traversal
def children
@node.lookups
end
end
end
end