In Files

Parent

String

Public Instance Methods

to_simple_string() click to toggle source
# File lib/string.rb, line 4
def to_simple_string
  a = self.gsub("\.", '-')
  a = a.gsub(':', '-').gsub('%20', '-')
  a = a.downcase.strip.gsub(' ', '-')
  while a.include? '--'
    a = a.sub("--", '-')
  end
  a = a.gsub(/-$/, '')
  a
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.