# File lib/geokit/geocoders.rb, line 47 def camelize(str) str.split('_').map {|w| w.capitalize}.join end
# File lib/geokit/geocoders.rb, line 30 def humanize(lower_case_and_underscored_word) lower_case_and_underscored_word.to_s.gsub(/_id$/, "").gsub(/_/, " ").capitalize end
# File lib/geokit/geocoders.rb, line 34 def snake_case(s) return s.downcase if s =~ /^[A-Z]+$/ s.gsub(/([A-Z]+)(?=[A-Z][a-z]?)|\B[A-Z]/, '_\&') =~ /_*(.*)/ return $+.downcase end
# File lib/geokit/geocoders.rb, line 18 def titleize(word) humanize(underscore(word)).gsub(/\b([a-z])/) { $1.capitalize } end
Generated with the Darkfish Rdoc Generator 2.