Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/databasedotcom/core_extensions/string_extensions.rb

Overview

This extends String to add the resourcerize method.

Instance Method Summary collapse

Instance Method Details

#resourcerizeObject

Dasherizes and downcases a camelcased string. Used for Feed types.


5
6
7
# File 'lib/databasedotcom/core_extensions/string_extensions.rb', line 5

def resourcerize
  self.gsub(/([a-z])([A-Z])/, '\1-\2').downcase
end