Class: Anydoc::List

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#itemsArray<ListItem> (readonly)

Returns:



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

#markerSymbol (readonly)

:bullet | :decimal | :lower_alpha | :upper_alpha | :lower_roman | :upper_roman

Returns:

  • (Symbol)


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

#startInteger (readonly)

Returns the ordinal the first item counts from.

Returns:

  • (Integer)

    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.

Returns:

  • (Boolean)

    whether the list is numbered.



137
# File 'lib/anydoc/document.rb', line 137

def ordered? = marker != :bullet