Module: Accession::CoreExtensions::String

Defined in:
lib/accession/accession/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#sanitizeObject

replace everything that is not a valid character with an underscore


8
9
10
# File 'lib/accession/accession/core_extensions.rb', line 8

def sanitize
  downcase.gsub(/[^\w\d]/i, '_')
end