Class: Hpricot::Doc
- Inherits:
-
Object
- Object
- Hpricot::Doc
- Defined in:
- lib/hpricot_scrub/hpricot_scrub.rb
Overview
class Elem
Instance Method Summary collapse
-
#scrub(config = nil) ⇒ Object
Scrubs the Hpricot document by removing certain elements and attributes according to the passed-in config WARNING: This is destructive.
Instance Method Details
#scrub(config = nil) ⇒ Object
Scrubs the Hpricot document by removing certain elements and attributes according to the passed-in config WARNING: This is destructive. If you want to keep your document untouched use a duplicate copy See the documentation on Hpricot::Elem#scrub for documentation of config
228 229 230 231 232 233 234 |
# File 'lib/hpricot_scrub/hpricot_scrub.rb', line 228 def scrub(config=nil) config = Scrub::normalize_config(config) (children || []).reverse.each do |child| child.scrub(config) if child.respond_to?(:scrub) end return self end |