mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 10:20:43 -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:
@@ -128,6 +128,15 @@ module Liquid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Traversal < Liquid::Traversal
|
||||
def children
|
||||
[
|
||||
@node.left, @node.right,
|
||||
@node.child_condition, @node.attachment
|
||||
].compact
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class ElseCondition < Condition
|
||||
|
||||
Reference in New Issue
Block a user