class Asciidoctor::AbstractBlock

def sections

returns an Array of Section objects

# => 1
section.sections.size
section << Block.new(section, :paragraph, 'paragraph 2')
section << Section.new(parent)
section << Block.new(section, :paragraph, 'paragraph 1')
section = Section.new(parent)

Examples

Only applies to Document and Section instances

Public: Get the Array of child Section objects
def sections
  @blocks.inject([]) {|collector, block|
    collector << block if block.is_a?(Asciidoctor::Section)
    collector
  }
end