Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/string_utils.rb

Instance Method Summary collapse

Instance Method Details

#anchorizeObject



2
3
4
# File 'lib/string_utils.rb', line 2

def anchorize
  CGI.escape(self.gsub(' ', '').gsub("\r", ''))
end

#parameterizeObject



6
7
8
# File 'lib/string_utils.rb', line 6

def parameterize
  self.downcase.gsub(/[^a-z0-9\-\(\)]/, '_')
end