module Lwes::Helpers

Public Instance Methods

camelcase(str) click to toggle source

converts snake cased strings to camelcase

# File lib/lwes/helpers.rb, line 4
def camelcase(str)
  str = str.to_s
  str.gsub(/^[a-z]|_+[a-z]/){|str| str.upcase}.gsub("_", '')
end