Class: Glossarist::SharedNonVerbalEntity

Inherits:
NonVerbalEntity
  • Object
show all
Defined in:
lib/glossarist/shared_non_verbal_entity.rb

Overview

Dataset-shared non-verbal entity — a NonVerbalEntity with a stable identity. Figure, Table, and Formula inherit from this; NonVerbRep (concept-local, positional) inherits from NonVerbalEntity directly.

The id is the stable identifier used for cross-referencing (e.g. figures/fig_A.23.yamlid: fig_A.23). The identifier is the human-readable label (e.g. “A.23”) used for display and AsciiDoc xref targets like <<fig_A.23>>.

Direct Known Subclasses

Figure, Formula, Table

Instance Method Summary collapse

Methods inherited from NonVerbalEntity

from_file

Instance Method Details

#all_idsObject



25
26
27
# File 'lib/glossarist/shared_non_verbal_entity.rb', line 25

def all_ids
  [id].compact
end

#find_by_id(target_id) ⇒ Object



21
22
23
# File 'lib/glossarist/shared_non_verbal_entity.rb', line 21

def find_by_id(target_id)
  id == target_id ? self : nil
end