Module: Accession::CoreExtensions::String
- Defined in:
- lib/accession/accession/core_extensions.rb
Instance Method Summary collapse
-
#sanitize ⇒ Object
replace everything that is not a valid character with an underscore.
Instance Method Details
#sanitize ⇒ Object
replace everything that is not a valid character with an underscore
9 10 11 |
# File 'lib/accession/accession/core_extensions.rb', line 9 def sanitize downcase.gsub(/[^\w\d]/i, '_') end |