Class: Coradoc::AsciiDoc::Model::BibliographyEntry

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/asciidoc/model/bibliography_entry.rb

Overview

Individual bibliography entry for AsciiDoc documents.

Bibliography entries represent single references within a bibliography, with anchor names for citation linking.

Examples:

Create a bibliography entry

entry = Coradoc::AsciiDoc::Model::BibliographyEntry.new
entry.anchor_name = "smith2023"
entry.ref_text = "Smith, J. (2023). Example citation."

See Also:

Instance Attribute Summary collapse

Attributes inherited from Base

#id

Method Summary

Methods inherited from Base

#block_level?, #inline?, #serialize_content, #simplify_block_content, #to_adoc, #to_h, visit, #visit

Instance Attribute Details

#anchor_nameString? (readonly)

Returns The anchor name for citing this entry.

Returns:

  • (String, nil)

    The anchor name for citing this entry



30
31
32
33
34
35
# File 'lib/coradoc/asciidoc/model/bibliography_entry.rb', line 30

class BibliographyEntry < Base
  attribute :anchor_name, :string
  attribute :document_id, :string
  attribute :ref_text, :string
  attribute :line_break, :string, default: -> { '' }
end

#document_idString? (readonly)

Returns The document identifier.

Returns:

  • (String, nil)

    The document identifier



30
31
32
33
34
35
# File 'lib/coradoc/asciidoc/model/bibliography_entry.rb', line 30

class BibliographyEntry < Base
  attribute :anchor_name, :string
  attribute :document_id, :string
  attribute :ref_text, :string
  attribute :line_break, :string, default: -> { '' }
end

#line_breakString (readonly)

Returns Line break character (default: “”).

Returns:

  • (String)

    Line break character (default: “”)



30
31
32
33
34
35
# File 'lib/coradoc/asciidoc/model/bibliography_entry.rb', line 30

class BibliographyEntry < Base
  attribute :anchor_name, :string
  attribute :document_id, :string
  attribute :ref_text, :string
  attribute :line_break, :string, default: -> { '' }
end

#ref_textString? (readonly)

Returns The reference text/citation.

Returns:

  • (String, nil)

    The reference text/citation



30
31
32
33
34
35
# File 'lib/coradoc/asciidoc/model/bibliography_entry.rb', line 30

class BibliographyEntry < Base
  attribute :anchor_name, :string
  attribute :document_id, :string
  attribute :ref_text, :string
  attribute :line_break, :string, default: -> { '' }
end