Class: Yuzu::PostProcessors::FirstParagraphPostProcessor

Inherits:
PostProcessor show all
Defined in:
lib/yuzu/postprocessors/first_paragraph.rb

Instance Attribute Summary

Attributes inherited from PostProcessor

#name

Instance Method Summary collapse

Methods inherited from PostProcessor

#match, postprocessors, registry, #value

Constructor Details

#initializeFirstParagraphPostProcessor

Returns a new instance of FirstParagraphPostProcessor.



5
6
7
8
# File 'lib/yuzu/postprocessors/first_paragraph.rb', line 5

def initialize
  @name = :first_paragraph
  @directive = "FIRSTPARAGRAPH"
end

Instance Method Details

#regexObject



10
11
12
# File 'lib/yuzu/postprocessors/first_paragraph.rb', line 10

def regex
  /<p\b[^>]*?>(.*?)<\/p>/n
end