Class: BodyParagraphJoiner

Inherits:
ParagraphJoiner show all
Defined in:
lib/notroff/paragraph_joiner.rb

Instance Method Summary collapse

Methods inherited from ParagraphJoiner

#join, #process

Instance Method Details

#join?(paragraph) ⇒ Boolean

Returns:

  • (Boolean)


40
41
42
43
44
# File 'lib/notroff/paragraph_joiner.rb', line 40

def join?(paragraph)
  return false unless paragraph[:type] == :body
  return false if paragraph.empty?
  true
end

#skip?(paragraph) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/notroff/paragraph_joiner.rb', line 46

def skip?(paragraph)
  paragraph[:type] == :body && paragraph.empty?
end