Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/hpricot_scrub/hpricot_scrub.rb

Instance Method Summary collapse

Instance Method Details

#scrub(config = nil) ⇒ Object



245
246
247
# File 'lib/hpricot_scrub/hpricot_scrub.rb', line 245

def scrub(config=nil)
  dup.scrub!(config)
end

#scrub!(config = nil) ⇒ Object



241
242
243
# File 'lib/hpricot_scrub/hpricot_scrub.rb', line 241

def scrub!(config=nil)
  self.gsub!(/^(\n|.)*$/, Hpricot(self).scrub(config).inner_html)
end