Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/string_utils.rb
Instance Method Summary collapse
Instance Method Details
#anchorize ⇒ Object
2 3 4 |
# File 'lib/string_utils.rb', line 2 def anchorize CGI.escape(self.gsub(' ', '').gsub("\r", '')) end |
#parameterize ⇒ Object
6 7 8 |
# File 'lib/string_utils.rb', line 6 def parameterize self.downcase.gsub(/[^a-z0-9\-\(\)]/, '_') end |