Class: Anydoc::Block
- Inherits:
-
Data
- Object
- Data
- Anydoc::Block
- Defined in:
- lib/anydoc/document.rb,
sig/anydoc.rbs
Overview
One block-level piece of content.
Instance Attribute Summary collapse
-
#anchor ⇒ String?
readonly
Heading: stable anchor id, when the document targets this heading.
-
#blocks ⇒ Array<Block>?
readonly
Block_quote.
-
#content ⇒ Array<Inline>?
readonly
Heading, paragraph.
-
#kind ⇒ Symbol
readonly
:heading | :paragraph | :list | :table | :block_quote | :code_block | :rule.
-
#lang ⇒ String?
readonly
Code_block.
-
#level ⇒ Integer?
readonly
Heading: 1-6.
- #list ⇒ List? readonly
- #table ⇒ Table? readonly
-
#text ⇒ String?
readonly
Code_block.
Instance Attribute Details
#anchor ⇒ String? (readonly)
Returns heading: stable anchor id, when the document targets this heading.
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#blocks ⇒ Array<Block>? (readonly)
Returns block_quote.
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#content ⇒ Array<Inline>? (readonly)
Returns heading, paragraph.
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#kind ⇒ Symbol (readonly)
:heading | :paragraph | :list | :table | :block_quote | :code_block | :rule
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#lang ⇒ String? (readonly)
Returns code_block.
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#level ⇒ Integer? (readonly)
Returns heading: 1-6.
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#list ⇒ List? (readonly)
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#table ⇒ Table? (readonly)
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |
#text ⇒ String? (readonly)
Returns code_block.
53 54 55 56 |
# File 'lib/anydoc/document.rb', line 53 class Block < Data.define( :kind, :level, :anchor, :content, :list, :table, :blocks, :lang, :text ) end |