Class: Coradoc::AsciiDoc::Model::Bibliography

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

Overview

Bibliography block element for AsciiDoc documents.

Bibliographies contain lists of bibliography entries (references) with support for various citation styles.

Examples:

Create a bibliography

bib = Coradoc::AsciiDoc::Model::Bibliography.new
bib.title = "References"
entry = Coradoc::AsciiDoc::Model::BibliographyEntry.new
bib.entries << entry

See Also:

Instance Attribute Summary collapse

Method Summary

Methods included from Anchorable

#default_anchor, #gen_anchor, included, #initialize

Methods inherited from Base

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

Instance Attribute Details

#entriesArray<Coradoc::AsciiDoc::Model::BibliographyEntry> (readonly)

Returns Bibliography entry items.

Returns:



28
29
30
31
32
33
34
# File 'lib/coradoc/asciidoc/model/bibliography.rb', line 28

class Bibliography < Base
  include Coradoc::AsciiDoc::Model::Anchorable

  attribute :id, :string
  attribute :title, :string
  attribute :entries, Coradoc::AsciiDoc::Model::BibliographyEntry, collection: true
end

#idString? (readonly)

Returns Optional identifier for the bibliography.

Returns:

  • (String, nil)

    Optional identifier for the bibliography



28
29
30
31
32
33
34
# File 'lib/coradoc/asciidoc/model/bibliography.rb', line 28

class Bibliography < Base
  include Coradoc::AsciiDoc::Model::Anchorable

  attribute :id, :string
  attribute :title, :string
  attribute :entries, Coradoc::AsciiDoc::Model::BibliographyEntry, collection: true
end

#titleString? (readonly)

Returns Optional bibliography title.

Returns:

  • (String, nil)

    Optional bibliography title



28
29
30
31
32
33
34
# File 'lib/coradoc/asciidoc/model/bibliography.rb', line 28

class Bibliography < Base
  include Coradoc::AsciiDoc::Model::Anchorable

  attribute :id, :string
  attribute :title, :string
  attribute :entries, Coradoc::AsciiDoc::Model::BibliographyEntry, collection: true
end