Module: Accession::CoreExtensions::String
- Included in:
- Accession
- Defined in:
- lib/accession/accession/core_extensions.rb
Overview
rubocop:todo Style/Documentation
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
8 9 10 |
# File 'lib/accession/accession/core_extensions.rb', line 8 def sanitize downcase.gsub(/[^\w\d]/i, '_') end |