class String

def clean

Returns:
  • (String) - The cleaned string.
  • (String) - The string with unwanted characters removed.
def clean
  gsub(/[^-a-zA-Z0-9\s]/, '').strip
end