Class: Coradoc::AsciiDoc::Model::Inline::Footnote

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

Overview

Footnote inline element for AsciiDoc documents.

Footnotes are referenced with numeric IDs: footnote: or footnoteref:.

Examples:

Create a footnote

footnote = Coradoc::AsciiDoc::Model::Inline::Footnote.new
footnote.text = "Additional information"
footnote.to_adoc # => "footnote:[Additional information]"

Create a footnote reference

footnote = Coradoc::AsciiDoc::Model::Inline::Footnote.new
footnote.id = "note1"
footnote.to_adoc # => "footnoteref:[note1]"

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#inline?

Methods inherited from Base

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

Instance Attribute Details

#idString? (readonly)

Returns Optional footnote reference ID.

Returns:

  • (String, nil)

    Optional footnote reference ID



27
28
29
30
# File 'lib/coradoc/asciidoc/model/inline/footnote.rb', line 27

class Footnote < Base
  attribute :text, :string
  attribute :id, :string
end

#textString (readonly)

Returns The footnote text content.

Returns:

  • (String)

    The footnote text content



27
28
29
30
# File 'lib/coradoc/asciidoc/model/inline/footnote.rb', line 27

class Footnote < Base
  attribute :text, :string
  attribute :id, :string
end