Parent

String

Public Instance Methods

classify() click to toggle source

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

# File lib/core_ext/string.rb, line 13
  def classify
    Object.const_get self
  end
to_qs_parameters() click to toggle source

(Not documented)

# File lib/caricature/clr/aspnet_mvc.rb, line 12
  def to_qs_parameters
    if self =~ /\?/
      parameters = NameValueCollection.new
      self.split('?')[1].split("&").each do |pair|
        parts = pair.split('=')
        parameters.add pair.first, pair.last
      end
      return parameters
    end
    nil
  end
to_url_filename() click to toggle source

(Not documented)

# File lib/caricature/clr/aspnet_mvc.rb, line 7
  def to_url_filename
    return self.gsub(/\?.*/, '') if self =~ /\?/
    self
  end
underscore() click to toggle source

converts a camel cased word to an underscored word

# File lib/core_ext/string.rb, line 4
  def underscore
    self.gsub(/::/, '/').
        gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
        gsub(/([a-z\d])([A-Z])/,'\1_\2').
        tr("-", "_").
        downcase
  end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.