Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/grooveshark/utils.rb
Instance Method Summary collapse
Instance Method Details
#normalize_attribute ⇒ Object
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 |