Sha256: 3b7f2cb13fde9ec4ecc487329516ff924ec36913f3b75ff730b4140c89a7a1eb
Contents?: true
Size: 407 Bytes
Versions: 14
Compression:
Stored size: 407 Bytes
Contents
require 'facets/string/pathize' class Module # Converts a class name to a unix path # # Examples # CoolClass.pathize #=> "cool_class" # My::CoolClass.pathize #=> "my/cool_class" # def pathize name.pathize #to_s. # gsub(/::/, '/'). # gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). # gsub(/([a-z\d])([A-Z])/,'\1_\2'). # tr("-", "_"). # downcase end end
Version data entries
14 entries across 14 versions & 2 rubygems