Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-webcomic/data.rb

Instance Method Summary collapse

Instance Method Details

#create_slugObject



5
6
7
8
9
# File 'lib/middleman-webcomic/data.rb', line 5

def create_slug
  s= self.downcase.gsub(/'/, '').gsub(/[^a-z0-9]+/, '-')
  s.chop! if s[-1] == '-'
  s
end