Class: ReeText::TextOnlyScrubber
- Inherits:
-
Loofah::Scrubber
- Object
- Loofah::Scrubber
- ReeText::TextOnlyScrubber
- Defined in:
- lib/ree_lib/packages/ree_text/package/ree_text/scrubbers/text_only_scrubber.rb
Instance Method Summary collapse
-
#initialize ⇒ TextOnlyScrubber
constructor
A new instance of TextOnlyScrubber.
- #scrub(node) ⇒ Object
Constructor Details
#initialize ⇒ TextOnlyScrubber
Returns a new instance of TextOnlyScrubber.
4 5 6 |
# File 'lib/ree_lib/packages/ree_text/package/ree_text/scrubbers/text_only_scrubber.rb', line 4 def initialize @direction = :bottom_up end |
Instance Method Details
#scrub(node) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/ree_lib/packages/ree_text/package/ree_text/scrubbers/text_only_scrubber.rb', line 8 def scrub(node) if node.text? CONTINUE else node.before node.children node.remove end end |