Parent

Files

System::String

Public Instance Methods

classify() click to toggle source

Gets the constant when it is defined that corresponds to this string

    # File lib/caricature/core_ext/system/string.rb, line 15
15:     def classify
16:       Object.const_get self
17:     end
underscore() click to toggle source

converts a camel cased word to an underscored word

    # File lib/caricature/core_ext/system/string.rb, line 6
 6:     def underscore
 7:       self.gsub(/::/, '/').
 8:         gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
 9:         gsub(/([a-z\d])([A-Z])/,'\1_\2').
10:         tr("-", "_").
11:         downcase
12:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.