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
Source
# File lib/scrub_rb/monkey_patch.rb, line 11 def scrub(replacement=nil, &block) ScrubRb.scrub(self, replacement, &block) end
Source
# File lib/scrub_rb/monkey_patch.rb, line 15 def scrub!(*args) self.replace( self.scrub(*args) ) end