Sha256: b2e39cfb6c6ba5c5472fdc8e66c344bc3256b84717d05350ef8a323d188f150a
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
module Transit module CoreExt module String def to_slug value = self.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n, '').to_s value.gsub!(/[']+/, '') value.gsub!(/\W+/, ' ') value.strip! value.downcase! value.gsub!(' ', '-') value end end end end String.send(:include, Transit::CoreExt::String)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
transit-0.0.2 | lib/transit/core_ext.rb |