Method: Asciidoctor::ListItem#initialize

Defined in:
lib/asciidoctor/list.rb

#initialize(parent, text = nil) ⇒ ListItem

Initialize an Asciidoctor::ListItem object.

Parameters:

  • parent

    The parent list block for this list item

  • text (defaults to: nil)

    the String text (default nil)



59
60
61
62
63
64
# File 'lib/asciidoctor/list.rb', line 59

def initialize parent, text = nil
  super parent, :list_item
  @text = text
  @level = parent.level
  @subs = NORMAL_SUBS.drop 0
end