utilities.rb 278 B

12345678910111213
  1. # Extend the default string
  2. # class for a sanitize method
  3. class String
  4. # Disinfects the string and returns it
  5. # For this, the dump method is used and the
  6. # quotation marks are cut away at the ends.
  7. #
  8. # @return [String]
  9. def sanitize
  10. return dump[1...-1]
  11. end
  12. end