Module: Infoboxer::Parser::Paragraphs

Includes:
Table, Tree
Included in:
Infoboxer::Parser
Defined in:
lib/infoboxer/parser/paragraphs.rb

Instance Method Summary collapse

Methods included from Table

#table, #table_caption, #table_cell_cont, #table_cells, #table_next_line, #table_params, #table_row, #table_template

Instance Method Details

#paragraphs(until_pattern = nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/infoboxer/parser/paragraphs.rb', line 8

def paragraphs(until_pattern = nil)
  nodes = Nodes[]
  until @context.eof?
    nodes << paragraph(until_pattern)

    break if until_pattern && @context.matched?(until_pattern)

    @context.next!
  end
  nodes
end