Class: Coradoc::Reference::Materializer::Base
- Inherits:
-
Object
- Object
- Coradoc::Reference::Materializer::Base
- Defined in:
- lib/coradoc/reference/materializer/base.rb
Overview
Protocol base. Subclasses declare their (kind, presentation,
format) tuple via class-level .kind, .presentation, .format
methods, then implement #materialize to produce a
CoreModel::InlineElement subtree.
Materializers consume Results — they never touch the catalog directly. The Presentation tells them where the target lives.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#materialize(edge:, result:, node:, presentation:, pages:) ⇒ CoreModel::Base?
Render one resolved edge.
Class Method Details
.format ⇒ Object
23 24 25 |
# File 'lib/coradoc/reference/materializer/base.rb', line 23 def format :any end |
.kind ⇒ Object
15 16 17 |
# File 'lib/coradoc/reference/materializer/base.rb', line 15 def kind nil end |
.presentation ⇒ Object
19 20 21 |
# File 'lib/coradoc/reference/materializer/base.rb', line 19 def presentation :any end |
Instance Method Details
#materialize(edge:, result:, node:, presentation:, pages:) ⇒ CoreModel::Base?
Render one resolved edge.
38 39 40 |
# File 'lib/coradoc/reference/materializer/base.rb', line 38 def materialize(edge:, result:, node:, presentation:, pages:) raise NotImplementedError end |