Class: Yuzu::PostProcessors::FirstParagraphPostProcessor
- Inherits:
-
PostProcessor
- Object
- Register
- PostProcessor
- Yuzu::PostProcessors::FirstParagraphPostProcessor
- Defined in:
- lib/yuzu/postprocessors/first_paragraph.rb
Instance Attribute Summary
Attributes inherited from PostProcessor
Instance Method Summary collapse
-
#initialize ⇒ FirstParagraphPostProcessor
constructor
A new instance of FirstParagraphPostProcessor.
- #regex ⇒ Object
Methods inherited from PostProcessor
#match, postprocessors, registry, #value
Constructor Details
#initialize ⇒ FirstParagraphPostProcessor
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
#regex ⇒ Object
10 11 12 |
# File 'lib/yuzu/postprocessors/first_paragraph.rb', line 10 def regex /<p\b[^>]*?>(.*?)<\/p>/n end |