Class: Glossarist::NonVerbalEntity

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/glossarist/non_verbal_entity.rb

Overview

Shared payload for every non-verbal representation, whether it lives inline on a concept (NonVerbRep) or as a dataset-shared file (Figure / Table / Formula).

The four attributes here are the common a11y + provenance payload every non-verbal entity carries, regardless of content type or scope:

  • caption: localized short title (a11y / indexing).

  • description: localized long description (a11y screen readers).

  • alt: localized alternative text (a11y short screen-reader label).

  • sources: bibliographic sources for the representation.

Identity (id, identifier) belongs on subclasses that have it; see SharedNonVerbalEntity for the dataset-shared variant.

Direct Known Subclasses

NonVerbRep, SharedNonVerbalEntity

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_file(path) ⇒ Object



39
40
41
42
43
# File 'lib/glossarist/non_verbal_entity.rb', line 39

def self.from_file(path)
  return nil unless File.exist?(path)

  from_yaml(File.read(path, encoding: "utf-8"))
end

Instance Method Details

#all_idsObject



35
36
37
# File 'lib/glossarist/non_verbal_entity.rb', line 35

def all_ids
  []
end

#find_by_id(_target_id) ⇒ Object



31
32
33
# File 'lib/glossarist/non_verbal_entity.rb', line 31

def find_by_id(_target_id)
  nil
end