Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/grooveshark/utils.rb

Instance Method Summary collapse

Instance Method Details

#normalize_attributeObject



2
3
4
5
6
7
# File 'lib/grooveshark/utils.rb', line 2

def normalize_attribute
  self.gsub(/^.*::/, "").
       gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
       gsub(/([a-z\d])([A-Z])/,'\1_\2').
       downcase
end