Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid_likes/helper.rb

Instance Method Summary collapse

Instance Method Details

#camelizeObject



2
3
4
# File 'lib/mongoid_likes/helper.rb', line 2

def camelize
  self.to_s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
end