Sha256: 66d2e93d5f4989972de3df57041742e08fb3d8e9e756bd7068390717f496f3eb

Contents?: true

Size: 484 Bytes

Versions: 15

Compression:

Stored size: 484 Bytes

Contents

class Jets::Util
  module Camelize
    # Not named camelize! because it conflicts with zeitwerk's camelize!
    def camelize(object)
      result = case object
      when Array
        object.map { |o| camelize(o) }
      when Hash
        Jets::Camelizer.transform(object).deep_symbolize_keys
      else
        object
      end

      case object
      when Symbol
        object
      when NilClass
        nil
      else
        object.replace(result)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/util/camelize.rb
jets-5.0.12 lib/jets/util/camelize.rb
jets-5.0.11 lib/jets/util/camelize.rb
jets-5.0.10 lib/jets/util/camelize.rb
jets-5.0.9 lib/jets/util/camelize.rb
jets-5.0.8 lib/jets/util/camelize.rb
jets-5.0.7 lib/jets/util/camelize.rb
jets-5.0.6 lib/jets/util/camelize.rb
jets-5.0.5 lib/jets/util/camelize.rb
jets-5.0.4 lib/jets/util/camelize.rb
jets-5.0.3 lib/jets/util/camelize.rb
jets-5.0.2 lib/jets/util/camelize.rb
jets-5.0.1 lib/jets/util/camelize.rb
jets-5.0.0 lib/jets/util/camelize.rb
jets-5.0.0.beta1 lib/jets/util/camelize.rb