method
transform_symbol_keys
v7.1.3.2 -
Show latest stable
- Class:
ActiveJob::Arguments
transform_symbol_keys(hash, symbol_keys)private
No documentation available.
# File activejob/lib/active_job/arguments.rb, line 188
def transform_symbol_keys(hash, symbol_keys)
# NOTE: HashWithIndifferentAccess#transform_keys always
# returns stringified keys with indifferent access
# so we call #to_h here to ensure keys are symbolized.
hash.to_h.transform_keys do |key|
if symbol_keys.include?(key)
key.to_sym
else
key
end
end
end