Class: Coradoc::CoreModel::Abbreviation

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/core_model/footnote.rb

Overview

Represents an abbreviation definition in a document

Abbreviations define the expansion of shortened terms. They are typically rendered with the full definition on first use.

Examples:

Creating an abbreviation

abbr = CoreModel::Abbreviation.new(
  term: "API",
  definition: "Application Programming Interface"
)

Instance Attribute Summary collapse

Attributes inherited from Base

#element_attributes, #id, #metadata_entries, #title

Method Summary

Methods inherited from Base

#accept, #attr, #metadata, #semantically_equivalent?, #set_attr, #set_metadata

Instance Attribute Details

#definitionString?

Returns the full definition/expansion.

Returns:

  • (String, nil)

    the full definition/expansion



83
# File 'lib/coradoc/core_model/footnote.rb', line 83

attribute :definition, :string

#termString?

Returns the abbreviated term.

Returns:

  • (String, nil)

    the abbreviated term



79
# File 'lib/coradoc/core_model/footnote.rb', line 79

attribute :term, :string