Class: SyntaxTree::XML::Visitor
- Inherits:
-
Object
- Object
- SyntaxTree::XML::Visitor
- Defined in:
- lib/syntax_tree/xml/visitor.rb
Overview
Provides a visitor interface for visiting certain nodes. It’s used internally to implement formatting and pretty-printing. It could also be used externally to visit a subset of nodes that are relevant to a certain task.
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#visit(node) ⇒ Object
10 11 12 |
# File 'lib/syntax_tree/xml/visitor.rb', line 10 def visit(node) node&.accept(self) end |