Module: Jets::Util::Camelize
- Included in:
- Cfn::Base, Cfn::Builder::Interface, Cfn::Resource::Standardizer, Core::Config::Base, Lambda::Definition
- Defined in:
- lib/jets/util/camelize.rb
Instance Method Summary collapse
-
#camelize(object) ⇒ Object
Not named camelize! because it conflicts with zeitwerk’s camelize!.
Instance Method Details
#camelize(object) ⇒ Object
Not named camelize! because it conflicts with zeitwerk’s camelize!
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jets/util/camelize.rb', line 4 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 |