Class: Anydoc::Document
- Inherits:
-
Data
- Object
- Data
- Anydoc::Document
- Defined in:
- lib/anydoc/document.rb,
sig/anydoc.rbs
Overview
The document model to_document returns.
Every class here is a Data, so instances are frozen, compare by value,
answer to_h, and destructure in case/in:
case block
in Anydoc::Block[kind: :heading, level:, content:]
...
end
Variants (block kinds, link targets, ...) are a kind symbol plus the
members that kind carries; members belonging to other kinds are nil.
Instance Attribute Summary collapse
-
#assets ⇒ Array[Asset]
readonly
Returns the value of attribute assets.
-
#blocks ⇒ Array[Block]
readonly
Returns the value of attribute blocks.
-
#notes ⇒ Array[Note]
readonly
Returns the value of attribute notes.
Class Method Summary collapse
Instance Attribute Details
#assets ⇒ Array[Asset] (readonly)
Returns the value of attribute assets.
57 58 59 |
# File 'sig/anydoc.rbs', line 57 def assets @assets end |
#blocks ⇒ Array[Block] (readonly)
Returns the value of attribute blocks.
55 56 57 |
# File 'sig/anydoc.rbs', line 55 def blocks @blocks end |
#notes ⇒ Array[Note] (readonly)
Returns the value of attribute notes.
56 57 58 |
# File 'sig/anydoc.rbs', line 56 def notes @notes end |