Sha256: fcb9ed5e2a60598420ce285c99a9f1a8abbd931cade0274031fc41f5e93f363f
Contents?: true
Size: 259 Bytes
Versions: 23
Compression:
Stored size: 259 Bytes
Contents
class String # Transform the current string into a permalink. def to_permalink self.gsub(/\W+/, ' ').strip.downcase.titleize.gsub(/\ +/, '_') end # Give a URI object created from the current string def to_uri N::URI.new(self) end end
Version data entries
23 entries across 23 versions & 1 rubygems