class Litbuild::MultiPartVisitor
This is a base class for Visitors that can be sent to multiple Parts and/or Appendices. It is appropriate for Visitors like AsciiDocVisitors.
Attributes
appendices[R]
other_parts[R]
Public Class Methods
new(directory:)
click to toggle source
Calls superclass method
# File lib/litbuild/multi_part_visitor.rb, line 12 def initialize(directory:) super @other_parts = [] @appendices = [] end
Public Instance Methods
visit_appendix(appendix)
click to toggle source
We need to call some methods on the appendix blueprint, so we store the entire appendix rather than just the name.
# File lib/litbuild/multi_part_visitor.rb, line 25 def visit_appendix(appendix) @appendices << appendix appendix.accept(visitor: self) end
visit_part(part)
click to toggle source
# File lib/litbuild/multi_part_visitor.rb, line 18 def visit_part(part) @other_parts << part.name part.accept(visitor: self) end