Class: Coradoc::AsciiDoc::Model::Table
- Includes:
- Anchorable
- Defined in:
- lib/coradoc/asciidoc/model/table.rb
Overview
Table element for AsciiDoc tables.
Represents a table with rows and cells. Tables can have titles, captions, and various formatting options.
Instance Attribute Summary collapse
-
#attrs ⇒ AttributeList
readonly
Additional table attributes.
-
#content ⇒ String?
readonly
Optional string content.
-
#id ⇒ String?
readonly
Optional identifier for the table.
-
#rows ⇒ Array<TableRow>
readonly
Table rows.
-
#title ⇒ String?
readonly
Optional table title.
Instance Method Summary collapse
Methods included from Anchorable
#default_anchor, #gen_anchor, included, #initialize
Methods inherited from Base
#inline?, #serialize_content, #simplify_block_content, #to_adoc, #to_h, visit, #visit
Instance Attribute Details
#attrs ⇒ AttributeList (readonly)
Returns Additional table attributes.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/coradoc/asciidoc/model/table.rb', line 26 class Table < Base include Coradoc::AsciiDoc::Model::Anchorable def block_level? true end attribute :id, :string attribute :title, :string attribute :rows, Coradoc::AsciiDoc::Model::TableRow, collection: true attribute :content, :string # attribute :anchor, Inline::Anchor, default: -> { # id.nil? ? nil : Inline::Anchor.new(id) # } attribute :attrs, Coradoc::AsciiDoc::Model::AttributeList end |
#content ⇒ String? (readonly)
Returns Optional string content.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/coradoc/asciidoc/model/table.rb', line 26 class Table < Base include Coradoc::AsciiDoc::Model::Anchorable def block_level? true end attribute :id, :string attribute :title, :string attribute :rows, Coradoc::AsciiDoc::Model::TableRow, collection: true attribute :content, :string # attribute :anchor, Inline::Anchor, default: -> { # id.nil? ? nil : Inline::Anchor.new(id) # } attribute :attrs, Coradoc::AsciiDoc::Model::AttributeList end |
#id ⇒ String? (readonly)
Returns Optional identifier for the table.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/coradoc/asciidoc/model/table.rb', line 26 class Table < Base include Coradoc::AsciiDoc::Model::Anchorable def block_level? true end attribute :id, :string attribute :title, :string attribute :rows, Coradoc::AsciiDoc::Model::TableRow, collection: true attribute :content, :string # attribute :anchor, Inline::Anchor, default: -> { # id.nil? ? nil : Inline::Anchor.new(id) # } attribute :attrs, Coradoc::AsciiDoc::Model::AttributeList end |
#rows ⇒ Array<TableRow> (readonly)
Returns Table rows.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/coradoc/asciidoc/model/table.rb', line 26 class Table < Base include Coradoc::AsciiDoc::Model::Anchorable def block_level? true end attribute :id, :string attribute :title, :string attribute :rows, Coradoc::AsciiDoc::Model::TableRow, collection: true attribute :content, :string # attribute :anchor, Inline::Anchor, default: -> { # id.nil? ? nil : Inline::Anchor.new(id) # } attribute :attrs, Coradoc::AsciiDoc::Model::AttributeList end |
#title ⇒ String? (readonly)
Returns Optional table title.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/coradoc/asciidoc/model/table.rb', line 26 class Table < Base include Coradoc::AsciiDoc::Model::Anchorable def block_level? true end attribute :id, :string attribute :title, :string attribute :rows, Coradoc::AsciiDoc::Model::TableRow, collection: true attribute :content, :string # attribute :anchor, Inline::Anchor, default: -> { # id.nil? ? nil : Inline::Anchor.new(id) # } attribute :attrs, Coradoc::AsciiDoc::Model::AttributeList end |
Instance Method Details
#block_level? ⇒ Boolean
29 30 31 |
# File 'lib/coradoc/asciidoc/model/table.rb', line 29 def block_level? true end |