mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user