Class: Uniword::Visitor::BaseVisitor Abstract
- Inherits:
-
Object
- Object
- Uniword::Visitor::BaseVisitor
- Defined in:
- lib/uniword/visitor/base_visitor.rb
Overview
Subclass and override visit methods to implement custom behavior
Abstract base class defining visitor interface for traversing document elements.
The Visitor pattern allows you to separate algorithms from the object structure they operate on, enabling new operations to be added without modifying the element classes.
Direct Known Subclasses
Instance Method Summary collapse
-
#visit_document(document) ⇒ void
Visit a document element.
-
#visit_image(image) ⇒ void
Visit an image element.
-
#visit_paragraph(paragraph) ⇒ void
Visit a paragraph element.
-
#visit_run(run) ⇒ void
Visit a run element.
-
#visit_table(table) ⇒ void
Visit a table element.
-
#visit_table_cell(table_cell) ⇒ void
Visit a table cell element.
-
#visit_table_row(table_row) ⇒ void
Visit a table row element.
Instance Method Details
#visit_document(document) ⇒ void
This method returns an undefined value.
Visit a document element.
28 29 30 |
# File 'lib/uniword/visitor/base_visitor.rb', line 28 def visit_document(document) # Default no-op implementation end |
#visit_image(image) ⇒ void
This method returns an undefined value.
Visit an image element.
76 77 78 |
# File 'lib/uniword/visitor/base_visitor.rb', line 76 def visit_image(image) # Default no-op implementation end |
#visit_paragraph(paragraph) ⇒ void
This method returns an undefined value.
Visit a paragraph element.
36 37 38 |
# File 'lib/uniword/visitor/base_visitor.rb', line 36 def visit_paragraph(paragraph) # Default no-op implementation end |
#visit_run(run) ⇒ void
This method returns an undefined value.
Visit a run element.
68 69 70 |
# File 'lib/uniword/visitor/base_visitor.rb', line 68 def visit_run(run) # Default no-op implementation end |
#visit_table(table) ⇒ void
This method returns an undefined value.
Visit a table element.
44 45 46 |
# File 'lib/uniword/visitor/base_visitor.rb', line 44 def visit_table(table) # Default no-op implementation end |
#visit_table_cell(table_cell) ⇒ void
This method returns an undefined value.
Visit a table cell element.
60 61 62 |
# File 'lib/uniword/visitor/base_visitor.rb', line 60 def visit_table_cell(table_cell) # Default no-op implementation end |
#visit_table_row(table_row) ⇒ void
This method returns an undefined value.
Visit a table row element.
52 53 54 |
# File 'lib/uniword/visitor/base_visitor.rb', line 52 def visit_table_row(table_row) # Default no-op implementation end |