lib/client_success/json_utilities.rb
def camelize(snake_word, first_upper = true)
      if first_upper
        snake_word.to_s
                  .gsub(/\/(.?)/) { "::" + $1.upcase }
                  .gsub(/(^|_)(.)/) { $2.upcase }
      else
        snake_word.chars.first + camelize(snake_word)[1..-1]
      end
    end
# Returns a string in camel case.
#
Returns a string in camel case.
Returns a string in camel case .
def camelize(snake_word, first_upper = true)
      if first_upper
        snake_word.to_s
                  .gsub(/\/(.?)/) { "::" + $1.upcase }
                  .gsub(/(^|_)(.)/) { $2.upcase }
      else
        snake_word.chars.first + camelize(snake_word)[1..-1]
      end
    end
def camelize ( snake_word , first_upper = true ) if first_upper snake_word . to_s . gsub ( / \/ (.?) / ) { "::" + $1 . upcase } . gsub ( / (^|_)(.) / ) { $2 . upcase } else snake_word . chars . first + camelize ( snake_word ) [ 1 .. - 1 ] end end
Returns a string in camel case.
Returns a string in camel case .
snake_word
first_upper