Module: Accession::CoreExtensions::String

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

Overview

rubocop:todo Style/Documentation

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