Sha256: 019dfe444238d02deb13b559c276a815fd0f11a9c28e563af0202f3c2904aad2
Contents?: true
Size: 248 Bytes
Versions: 2
Compression:
Stored size: 248 Bytes
Contents
class String # Converts a (class or module) name to a unix path. # # My::CoolClass.name.pathize #=> "/my/cool_class" # def pathize gsub(/([A-Z]+)([A-Z])/,'\1_\2').gsub(/([a-z])([A-Z])/,'\1_\2').gsub('::','/').downcase end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facets-2.4.4 | lib/core/facets/string/pathize.rb |
facets-2.4.3 | lib/core/facets/string/pathize.rb |