Class: String

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

Instance Method Summary collapse

Instance Method Details

#sluggifyObject



6
7
8
9
10
11
12
13
14
# File 'lib/mandrill_queue/core_ext.rb', line 6

def sluggify
	value = self
   value.gsub!(/[']+/, '')
   value.gsub!(/\W+/, ' ')
   value.strip!
   value.downcase!
	value.gsub!(/[^A-Za-z0-9]/, '-')
   value
end