Class: Metanorma::Plugin::Glossarist::ConceptRenderer
- Inherits:
-
Object
- Object
- Metanorma::Plugin::Glossarist::ConceptRenderer
- Includes:
- CitationHelper
- Defined in:
- lib/metanorma/plugin/glossarist/concept_renderer.rb
Constant Summary collapse
- TERM_TYPES =
%w[preferred admitted deprecated].freeze
Instance Method Summary collapse
-
#initialize(concept, depth:, anchor_prefix: nil) ⇒ ConceptRenderer
constructor
A new instance of ConceptRenderer.
- #render ⇒ Object
Methods included from CitationHelper
Constructor Details
#initialize(concept, depth:, anchor_prefix: nil) ⇒ ConceptRenderer
Returns a new instance of ConceptRenderer.
10 11 12 13 14 |
# File 'lib/metanorma/plugin/glossarist/concept_renderer.rb', line 10 def initialize(concept, depth:, anchor_prefix: nil) @concept = concept @depth = depth @anchor_prefix = anchor_prefix end |
Instance Method Details
#render ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/metanorma/plugin/glossarist/concept_renderer.rb', line 16 def render sections = [concept_header] sections << alt_terms_section sections << definition_section sections << examples_section sections << notes_section sections << sources_section sections.compact.join("\n\n") end |