Class: Anydoc::List
- Inherits:
-
Data
- Object
- Data
- Anydoc::List
- Defined in:
- lib/anydoc/document.rb,
sig/anydoc.rbs
Overview
A list and the marker family the source document used for it.
Instance Attribute Summary collapse
- #items ⇒ Array<ListItem> readonly
-
#marker ⇒ Symbol
readonly
:bullet | :decimal | :lower_alpha | :upper_alpha | :lower_roman | :upper_roman.
-
#start ⇒ Integer
readonly
The ordinal the first item counts from.
Instance Method Summary collapse
-
#ordered? ⇒ Boolean
Whether the list is numbered.
Instance Attribute Details
#items ⇒ Array<ListItem> (readonly)
135 136 137 138 |
# File 'lib/anydoc/document.rb', line 135 class List < Data.define(:marker, :start, :items) # @return [Boolean] whether the list is numbered. def ordered? = marker != :bullet end |
#marker ⇒ Symbol (readonly)
:bullet | :decimal | :lower_alpha | :upper_alpha | :lower_roman | :upper_roman
135 136 137 138 |
# File 'lib/anydoc/document.rb', line 135 class List < Data.define(:marker, :start, :items) # @return [Boolean] whether the list is numbered. def ordered? = marker != :bullet end |
#start ⇒ Integer (readonly)
Returns the ordinal the first item counts from.
135 136 137 138 |
# File 'lib/anydoc/document.rb', line 135 class List < Data.define(:marker, :start, :items) # @return [Boolean] whether the list is numbered. def ordered? = marker != :bullet end |
Instance Method Details
#ordered? ⇒ Boolean
Returns whether the list is numbered.
137 |
# File 'lib/anydoc/document.rb', line 137 def ordered? = marker != :bullet |