Class: Coradoc::AsciiDoc::Model::List::Base
- Inherits:
-
Base
- Object
- Lutaml::Model::Serializable
- Base
- Coradoc::AsciiDoc::Model::List::Base
- Includes:
- Anchorable
- Defined in:
- lib/coradoc/asciidoc/model/list/base.rb
Overview
Shared base class for all list container types.
Every list flavor (Core, Definition, and any future ones) inherits the universal list-level attributes from this class:
- +id+ optional anchor identifier (inherited from Model::Base)
- +attrs+ block attribute list, e.g. +[%hardbreaks]+ or +[#my-id]+
Subclasses declare their own items with the appropriate item type (List::Item for ordered/unordered, List::DefinitionItem for definition) plus any flavor-specific attributes (marker, prefix, delimiter, …).
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attrs ⇒ Coradoc::AsciiDoc::Model::AttributeList
readonly
Additional list attributes parsed from the
[...]block header preceding the list.
Attributes inherited from Base
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 ⇒ Coradoc::AsciiDoc::Model::AttributeList (readonly)
Returns Additional list attributes parsed from the [...] block header preceding the list.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/coradoc/asciidoc/model/list/base.rb', line 22 class Base < Coradoc::AsciiDoc::Model::Base include Coradoc::AsciiDoc::Model::Anchorable attribute :attrs, Coradoc::AsciiDoc::Model::AttributeList, default: -> { Coradoc::AsciiDoc::Model::AttributeList.new } asciidoc do map_attribute 'id', to: :id map_attribute 'attrs', to: :attrs end def block_level? true end end |
Instance Method Details
#block_level? ⇒ Boolean
34 35 36 |
# File 'lib/coradoc/asciidoc/model/list/base.rb', line 34 def block_level? true end |