class String

Have to explicitly require this file to get the monkey patching of String#scrub in there, this file won't and shouldn't be 'require'd in automatically.

However if there's already a String#scrub defiend, requiring this file will do nothing.

Public Instance Methods

scrub(replacement=nil, &block) click to toggle source
# File lib/scrub_rb/monkey_patch.rb, line 11
def scrub(replacement=nil, &block)
  ScrubRb.scrub(self, replacement, &block)
end
scrub!(*args) click to toggle source
# File lib/scrub_rb/monkey_patch.rb, line 15
def scrub!(*args)
  self.replace( self.scrub(*args) )
end